AnsweredAssumed Answered

Validation Woes

Question asked by revmk on Oct 11, 2010
Latest reply on Oct 11, 2010 by revmk

Title

Validation Woes

Post

Hi all,

I'm having problems validating some input data.  I think it is a two fold problem really.

Initially I started my solution in an 'always save' mode as it seemed easy enough to get started with and I didn't want a load of complex layouts with associated scripts.  However I have now found that validation is a little on the sticky side.

I have 4 fields (a, b, c, d).  3 of which (b, c & d) should only hold data if, field a is true.  However here lies the problem.  If I add validation to field b along the lines of;

If (field_a = 1 and Length ( field_b ) >1  and Length ( field_b ) <16 ; 1 ;0) <<custom error>>

An error is generated if field_a is accidently set to 1 and then reverted - OK, so it did what I told it to do.  So I thought maybe I could add 'allow user to override' the validation.  However this creates problems if the user really did want field_a as 1 and the opther fields are accidently blank, too short etc.

OK, so maybe turning off auto save is the best idea so that the validation is not carried out until the end.  The problem with this is that it means I now have to maintain 4 layouts of reasonably complex layouts (two edit mode, 2 read only - as I have some fields that I do not wish to show based on a selection).  

Surely there is a better solution to this?  

It is annoying to me that I can't 'hide' a field based on a selection of another field, unfortunately custom formatting just doesn't cut far enough in as the fields are still usable if a user knows where they are.

Thanks

Outcomes