July 16, 201213 yr Newbies I would like a script to control that the user entered the correct value in a field. And If the value is incorrect a pop-up should alert them. The field in question is the social security number (swedish). A correct value could be: 570322-1453 (YYMMDD-XXXX). Only numbers and a "-" as the 7th symbol is correct. Everything else is incorrect and should trigger the script onObjectExit. Thanks in advance!
July 16, 201213 yr You can use this in a second field and just enter your numbers with out the "-" ie you enter 5478546541 and you get 547854-6541 if you have Advanced you can make this a custom function and not need a second field, this would be prefered... hope it helps Let( [$ssn = Filter(social; "0123456789"); $socialsecuritynumber = Left($ssn;6) &"-" & Right($ssn;4)]; $socialsecuritynumber )
July 16, 201213 yr why not take control of the field by converting the date and number by using separate parts. Date Field Number field Calculation Right (Year ( Date ) ; 2) & Left ( 0 & Month ( Date ) ; 2) & Left ( 0 & Day ( Date ); 2) & "-" & Number 120716-1453 120701-1453 amended for single digit days
Create an account or sign in to comment