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.

Launch script from calculation

Featured Replies

I am updating an old database that I haven't used in awhile. I used to use EventScript plugin to launch a script from a calculation, but have lost it and it doesn't seem to be available anymore. Is there a built in way to accomplish this now?

My calculation is just an if statement that checks if there is an entry in a related table, and if not, launches a script.

Thanks

Script triggers may be your answer. 

  • Author

Thanks for the suggestion. That seemed like it would work, but I'm having a hard time writing the if statement to check to see if there is an entry on the related table based on what was just entered into my field (a barcode number).

Was trying

 If ( not IsEmpty ( BtlBarcode ) and LiquorCatalog::Barcode = ""

but it launches the script whether there is a matching entry or not.

It may be to do with the brackets and comparing to an empty string.

Does If ( not ( IsEmpty ( BtlBarcode ) ) and ( IsEmpty ( LiquorCatalog::Barcode) )

work better?

I could help more if I knew what your script did. Looks like a simple scenario where the user scans a barcode and that is captured in a global field. The script would simply do a find for that barcode. What are you doing?

bwt, yes, script triggers always run. This one might be onObjectExit (given the scanner enters a trailing return or tab). Then, the script called by the trigger would validate that the barcode isn't empty (if so exit) or proceed with a find.

  • Author
On 11/19/2017 at 11:24 PM, rwoods said:

It may be to do with the brackets and comparing to an empty string.

Does If ( not ( IsEmpty ( BtlBarcode ) ) and ( IsEmpty ( LiquorCatalog::Barcode) )

work better?

That seems to have done the trick!! thanks for the suggestion.

Will not know for sure until this Sunday when I will be using the database again, but for now, it seems like it's working.

Thanks again.

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.