Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Act upon before Filemaker displays search result is 'zero'.


This topic is 4810 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted

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.

Posted

Yeah, that works even better...

If [Get ( LastError ) = 401]

401 Being the Filemaker code for 'No records match the request'.

Solved...

This topic is 4810 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.