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.

Executing a Script if records are found

Featured Replies

Dear All,

I am trying to execute a script that is used to remove redudant data. I perform a search for duplicates and then execute the script to remove the appropriate duplicate. The problem is that if the search returns an empty set, the script is executed anyway. How can I stop it from running if their are no duplicates?

Thanks

Dave Collins

No Limits IT

Inaburra School

Assuming Set Error Capture [On] has been called in your script already, add an

If [status(CurrentFoundCount)]

steps to remove dupes

End If

If no records are found, it won't execute what's between the If statement.

Hello Dave and Queue,

The method Queue has suggested is a valid 'alternative' method and may well be suitable.

For the sake of interest, the 'conventional' method would be to start the script with the Set Error Capture [On] command and then to include the steps:

If ["Status(CurrentError) = 401"]

Exit Script

End If

- which would come immediately after the 'Perform Find' step.

The conventional approach is not inherently better - unless you have additional error conditions to test for within the same script, in which case it would make sense to use the inbuilt error code system.

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.