Expand my Community achievements bar.

How to show subform based on first two characters of a combed numeric field?

Avatar

Former Community Member

Hello all,

I'm trying to figure out how to show a subform only if the first two characters that are entered into a numeric field are 1 and 4, or 2 and 6.

The numeric field allows for a max of 8 characters and the pattern is num{99999999}.

I don't know what the code is to validate and execute a code based on the first two characters in a combed-object. Also, I assume i have to set the code to the calculate or exit event and use JavaScript as my language.

Thanks all for your help!

Diana

1 Reply

Avatar

Level 7

In the exit event of the numeric field in formcalc you could do:

if (Left($,2) == 14 or Left($,2) == 26) then

...

endif