Thursday, December 28, 2006

Thanks to "@Eval"

Hi there,

It was still now a big problem for me to write a code validation on all the 25 fields, now "@Eval" made my work very simple. Let me explain you the excellent new feature of R6 "@Eval" function.

Have a ComputedForDisplay Fields with the below code as a default value, name the field as "dEval".

"@If(@ThisValue=\"\";@Failure(\"Please enter \" + @Leftback (@ThisName;2) + \" value\");@Success)"

Says for example if we have 25 fields which has be checked for NULL validation. Field names as follows

Name1TX, Name2TX,Name3TX ..... Name25TX.

Copy the below code in "Input Validation" section of the field as,

@Eval (dEval) that's it. Copy paste the same in all 25 fields. Validation job is done.

@Eval is very usefull in lot of places, if we are writing the same set of code in more that 1 field we can use this "@Eval" function.

Best Regards
Karthik

No comments: