How do I detect an empty set after a search?
I am trying to branch off my script with an if statement depending on the results of a search.
What condition would I use for the if statement? I thought FMP returns an "401" error code when search returns no results, and I am currently using it but it is not working.
Here is my script:
Set Error Capture [ On ]
Go to Layout [ “search_layout” ]
Enter Find Mode[ Pause ]
Set Field [ PSC_ECO::gErrorCaptureField; Get (LastError) ]
If [ PSC_ECO::gErrorCaptureField = 401 ]
Show Custom Dialog ["Not Found"; "This ECO does not exist. Are you sure your entries are correct?"]
Go to Layout [ “PSC_ECO” ]