Jump to content

Launch script from calculation


This topic is 2338 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 2338 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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