Jump to content
The ORIGINAL FileMaker Community - Forum - Online Business Apps & Software Forum

Recommended Posts

Hershy_s

I wrote a script where the script Perform Find (restore).

 

When the FoundCount=0 I get the error message Modify Continue or Cancel. Is there anyway for me to do the Find with no dialog if the Found count=0

Share this post


Link to post
Share on other sites
Steve Martino

Use the script step Set Error Capture [On]. Although from a user perspective you may want to also add in a Show Custom Dialog, inform the user of no matching records and give them some options, so they know the find was executed and nothing was found.

Share this post


Link to post
Share on other sites
doughemi

To expand on Steve's answer, the Set Error Capture [On] should be placed at the beginning of the script, and the corresponding Set Error Capture [Off] should be placed after the Find step, but before any Perform Script[] command which may follow. Also note that if a find is performed and no records are found, the found set becomes the entire table.

Share this post


Link to post
Share on other sites
AHunter3
Also note that if a find is performed and no records are found, the found set becomes the entire table.

 

No it doesn't. Perform Find with error capture on results in a found set of 0 if no matching records exist.

Share this post


Link to post
Share on other sites
doughemi

Thanks, Allan. To correct my other error, if Error Capture is off, the previous found set is returned, not all the records.

FoundSets.fmp12.zip

Share this post


Link to post
Share on other sites
This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
×
  • Create New...

Important Information

Terms of Use