September 11, 201213 yr Newbies Guys, I've tried to look everywhere but I can't find the information I need. I need a script that performs a series of action. In the middle of the script I would like to have a dialog box that allows the person to insert some text. After that based on that text I need the script to perform a search in the database. Hope to be able to explain the problem... thank you for your help!
September 11, 201213 yr Hi and welcome to FMForums. :-) To accept User input you need a field. Create global text field called gSearch then pseudo-script would be: ... do your actions Set Field [ gSearch ; "" ] Show Custom Dialog [ OK ; cancel ; ... On input tab, specify using the global by selecting it and include label. ] If [ Get ( LastMessageChoice ) = 2 // User selected cancel ] ... do whatever you wish if search is cancelled Else # User wants to continue Enter Find Mode [ uncheck pause ] Set Field [ youFieldToSearch ; gSearch ] Set Error Capture [ On] Perform find[] If [ not Get ( FoundCount ) ] Show custom dialog [ "no records found" ] ... do whatever Else ... Records found so do whatever End if End if This is difficult to fully view on the iPad, LOL, so it is a bit rough. :-) .
Create an account or sign in to comment