Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Exiting A Script When Find Produces No Records

Featured Replies

I am having difficulty find a way to exit a script that incorporates a find. I want to be able to exit the script and return to browse mode if no records are found without the user having the option to "modify find" or "continue". Anyone have any suggestions?

Thanks!

Since this this is about find and not constrain found set, is it pretty straight forward:


Set Error Capture [ On ] 

Perform Find [ ]  

If [  not Get ( FoundCount ) ] 

Show All Records 

Exit Script [  ] 

End If 

Set Error Capture [ Off ] 

While it when constrain is in action must have measures to recreate the found set, such as:

http://www.sumware.net/robfm/savingfoundsets.php

...shown in this template:

http://www.kevinfrank.com/download/preserve-and-restore-found-sets.zip

--sd

Hi Bonngo,

I use the below script for basically what you are asking. Hope it gets you headed in the right direction.

Set Error Capture[On]

Enter Find Mode[Restore]

Perform Find

If[Get(lastError)=401]

Show Custom Dialog["Message";"No Units have shipped today!"]

Exit Script[]

End If

Soren is fast this morning. I need more coffee

:

But it shows you another method of the same thing. :)

Michael

Edited by Guest
Missing bracket

Soren,

Why the Set error step off at the end of the script? I'm not in practice of turming it off at the end of a script. Should I be?

Michael

  • Author

Thank you both very much, exactly what I needed!

No only if the script procedes on futher, the state evaporates when the script is terminated, but often are they only on halt/pause if the scripting is recursive, or perpertuate scripting is going on to avoid users getting stucked in findmode.

Examine that a button have several modes to deal with the eventually running script, halt, exit, resume and pause.

--sd

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.