Jump 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.

Scripting the Find

Featured Replies

I run a find in a script, but want to run it w/out dialogue. For instace, when it doesn't find anything, i want it to skip that step and move on. I know you have to do something with error capture.

Thanks

-j

After:

Perform find []

try something like:

If ["Status (CurrentFoundCount) = 0"]

this should happen

Else

do this

End if

Cretae a global number field in your database to store the error code -- " gError". Script steps would then be:

Enter Find Mode []

<stuff to make find requests>

Set Error Capture [on]

Perform Find []

Set Field [gError, Status(CurrentError)]

Set Error Capture [off]

If [gError = 0]

# stuff when records found

Else

# the find step generated an error of some sort

If [gError = 401]

# no records match this request

<script stuff when no records found>

Else

# some other error, may indicate a problem

<script stuff when a real find error occurs>

End If

End If

Note in the script that I have included conditionals to work out when no records are found, and another when some other error occurs. For instance, error 400 is "Find criteria is empty" -- you probably don't want to do your <no records found> script steps when in actual fact the user clicked the Find button without typing anything!

That's called Defensive coding.

For instance, the script could be expanded to handle this instance...

If [gError = 0]

# stuff when records found

Else

# the find step generated an error of some sort

If [gError = 401]

# no records match this request

<script stuff when no records found>

Else

If [gError = 400]

# no find criteria

<script stuff when no criteria entered>

Else

# some other error, may indicate a problem

<script stuff when some other unexpected error occurs>

End If

End If

End If

Create an account or sign in to comment

Important Information

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

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.