AnsweredAssumed Answered

Script Help

Question asked by Annette on Jul 18, 2013
Latest reply on Jul 18, 2013 by Annette

Title

Script Help

Post

     Hello,

     was hoping to get some help with what i thought was a simple script that isn't working.

     On a layout I have various fields, name, data of bith, address, etc. 

     I'm trying to build a script to make sure key fields are completed and not left blank, key fields being first, last name and date of birth.  I was trying to build it in steps since I still am learning.  Tried starting with checking on DOB.  I have the following script on button, if the data of birth field is blank i want it to prompt to complete it, if it's not blank then proceed to layout.  It's prompting me when the dob is blank but then once i fill it in when i click button again to move on it doesn't go to the layout. 

SetVariable [$NoData; Value;""]

If [IsEmpty (client info::DOB)]

Set variable [$NoData; Value: $NoData & "DOB MIssing"]

If [IsEmpty ($NoData)]

Go to layout [MainMenu]

else

show custom dialog ["Enter DOB"; "Client date of birth is required"]

End if

End if

     What am I doing wrong that it won't move to the layout once I have filled in the empty field??  Once I get it right I want to add more if statements to check for a couple of other blank fields but wanted to make sure I got one to work first.

     Thanks for the help!

Outcomes