saralee Posted June 22, 2010 Posted June 22, 2010 Hi everyone.. this is another thing that's been im my mind but not sure if I can implement it or not- I want to incorporate a script with a pop-up error/reminder message for the data input. For example, when people input the address in the address field, I want to be able to detect if they input something like "Aparment" "Unit" or "Suite" (I assume this part can be done by a script) and if they do I want to automatically pop up an error message to remind them to input "Apt." instead... Can I do that in FM? Thanks a lot! :
Vaughan Posted June 22, 2010 Posted June 22, 2010 This could be done with field-level validation, but it would probably be nicer with a scripted process. Hold the user in a loop to keep their attention: Allow User Abort [off] ... Loop Pause/Resume Script [indefinitely] Exit loop if [ patterncount( field ; "apartment" ) = 0 and ... etc ] Beep Show Dialog [ Change apartment ] End Loop Watch that loop and ensure you have a valid exit condition otherwise you'll be in there for a while. Backup frequently while testing. In fact, set user abort on while testing and switch off when it's working.
saralee Posted June 24, 2010 Author Posted June 24, 2010 (edited) Thank you! I will give it try.. Edited June 24, 2010 by Guest
saralee Posted July 7, 2010 Author Posted July 7, 2010 Hi Vaughan, Thank you for the information a while ago. I tried the logic in my script, but ran into some issues. I basically wrote all the cases of the correct address input in the "exit loop if" line and filled the "show dialog" line with the warning message. But during my testing, the script will be paused and the error message will show up no matter what I input... Any ideas here? Thanks a lot!
Vaughan Posted July 7, 2010 Posted July 7, 2010 Post what you've done, especially the Case statement in the exit loop.
saralee Posted July 7, 2010 Author Posted July 7, 2010 Hi Vaughan, Please see the attached screenshot for my script. Thank you!
Vaughan Posted July 8, 2010 Posted July 8, 2010 You need to post the expression that's in the Exit Loop step. Also realise that that unless *all* the criteria are met the user will be kept in the loop.
saralee Posted July 8, 2010 Author Posted July 8, 2010 this is my script in the Exit loop which includes all the "messed up" input cases PatternCount(HouseHolds::Address;"E")=0 and PatternCount(HouseHolds::Address;"E.")=0 and PatternCount(HouseHolds::Address;"W")=0 and PatternCount(HouseHolds::Address;"W.")=0 and PatternCount(HouseHolds::Address;"Ave")=0 and PatternCount(HouseHolds::Address;"Avenue")=0 and PatternCount(HouseHolds::Address;"St")=0 and PatternCount(HouseHolds::Address;"Street")=0 and PatternCount(HouseHolds::Address;"st")=0 and PatternCount(HouseHolds::Address;"street")=0 and PatternCount(HouseHolds::Address;"Cres")=0 and PatternCount(HouseHolds::Address;"Crescent")=0 and PatternCount(HouseHolds::Address;"Road")=0 and PatternCount(HouseHolds::Address;"Rd")=0 and PatternCount(HouseHolds::Address;"Boulevard")=0
Recommended Posts
This topic is 5252 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now