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.

Show message IF find = '0'

Featured Replies

Any help really appreciated - have been stuck on this problem for last 3 days!

Have a basic script when user peforms find, that takes to new layout showing find. Now want to show message in this layout if the end users find = '0'. I have this script:

Set error capture (on)

Show all records

Peform find (constrain found set)

If [status(currenterror) = <>0]

Show message [custom message]

End if

Go to layout["full record"]

Set field ["Total no of records']

I have changed it around, with Go to layout & set field above IF command. But it either just takes me to new layout and not show message or always shows messgae when found some records or none! Tried to read on forum for help, but to no avail. I keep hearing about global field, but not sure if need this?? If so, where does it go and what should it contain?

cheers (from a very confused Fm user!) Banghead.gif

I think the problem is that you need to use an "else" step. Try this.

Set error capture (on)

Show all records

Peform find (constrain found set)

If [status(currenterror) = <>0]

Show message [custom message]

Show all records

Else

Go to layout["full record"]

Set field ["Total no of records']

End If

FYI: The first Show All Records step is not needed as the found set is being replaced by the result of the Find.

  • Author

Have made changes as suggested by Robert - cheers it works! I cam now sleep at night!

Have also removed unneccessary line as suggested by Ender.

THANKS!!!!!!!!!!!!!!!!!!!!!!!!BirthdayPartyGuy.gif

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.