"No records match this find criteria"
I am trying to stop the script if variable search results come up as "No records match this find criteria"Can someone point me in the right direction?
You need to turn error capture on and then handle the results of no records found yourself. It might look something like this:
Enter Find Mode [ pause ]
# User enters criteria and hits return
Set Error Capture [ On ]
Perform Find [ ]
If [ Get ( LastError ) = 401 ]
# No records were found
Show Custom Dialog [ "No records found.]
... do whatever if no records found
... do whatever if records are found
I tried to do this but could not get "Get(Last error) = 401" into the calculation of If. There is no Get(Last error) function and typing it in free text brings up an error message. How do you do it?
I want to change the grammatically incorrect "No records match this find criteria" to "No records match this find criterion" or "… these find criteria".
I would not want my customers to think that the grammatical mistake was mine :-)
There is no space between 'Last' and 'Error' - it is Get ( LastError ). You can see other 'Get' functions if you change the pop-up at the top right of the calculation dialogue to show 'Get Functions'.
You could also use Get ( FoundCount ) = 0 in this case.
I think I would show a dialogue that just said "There are no matching records' or something else universal, as I think checking how many criteria the user entered would be disproportionately difficult.
Retrieving data ...