November 17, 20178 yr 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
November 18, 20178 yr 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.
November 20, 20178 yr 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?
November 20, 20178 yr 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.
November 23, 20178 yr 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