September 21, 201114 yr Having a bit of an issue here... I want to act upon a search result prior to Filemaker displaying search result returned empty... So basically, if the 'found count' or search result is empty, do a different search. I do not want the end user to see the search returned empty. Since they didn't search for anything (a script did) it's confusing for them.
September 21, 201114 yr Author OK, found it... That was fast :-). Tried to remove the article but can't. But it might be useful for somebody else. Just to explain... I have a 'trash field' which is normally 0 and 'when trashed' 1. This way I can include/exclude certain records, deleting it without completely deleting it so to speak. But when only one record is present in the 'trash' (a script that searches for 'trash=1') and I take this last record 'out of the trash' the 'show trash find script' returned 'nothing found' causing Filemaker to ask to 'modify' the search. So I adapted the script... If [Get ( FoundCount ) = 1] Perform Script 1 Else Perform Script 2 End If When the FoundCount = 1 I know that once removed, the search result will return empty. So I'm one step ahead of Filemaker telling me so.
September 21, 201114 yr Author Yeah, that works even better... If [Get ( LastError ) = 401] 401 Being the Filemaker code for 'No records match the request'. Solved...
Create an account or sign in to comment