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.

Script Trigger on a Calculation Field

Featured Replies

Hi everybody i've trying to apply a script trigger to a calculation field that should start when the value of the calculation is not equal to another field. I think that i'm wrong but nothing happens with the script when the condition is true. Thank you in advance for any suggestion. Maybe the script trigger is not applicable to the calculation field?

Not natively. You can look for plugin alternatives.

Why not trigger the script when the "other" field is not equal to the value? (IOW forget the calculation field.)

  • Author

thank you, maybe this could be usefull in a future upgrade... thank you anyway

  • Author

Why not trigger the script when the "other" field is not equal to the value? (IOW forget the calculation field.)

sorry i've forgotten to mention that both fields ar calculated... so i think that's impossible to do. In a few words what i wanna do is that an alert advice me when one of the two calculated fields is not equal to the other, every time in that record one of the values changes. Many thanx

Attach the script trigger to the layout (OnRecordCommit) or to the individual value fields.

thank you, maybe this could be usefull in a future upgrade... thank you anyway

You show vs. 9. But script triggers are only in vs. 10. :qwery:

If vs. 9, as indicated, you will need a plug-in but know that script firing on calculation change is an advanced use which can be difficult to control. Another option might be:

You can combine the formulas inside each of the two calculations, into a new calculation and place THAT on your layouts. It will display whenever the values change or (if related values are used, when screen is refreshed). For instance, if calc1 is Customers::MaxInvoices and calc2 is Count (Invoices::CustomerID) then create new calc in Customers with:

Case ( MaxInvoices :notequal: Count ( Invoices::CustomerID ) ; "Different Totals!!" )

It can be in large red lettering which you place on your layout. YOu can also have the calculation evaluate to boolean 1 as:

MaxInvoices :notequal: Count ( Invoices::CustomerID )

Then, at layout level, format the number as boolean and type "Wrong!" in the yes box (it is limited to 7 characters). :wink2:

  • Author

Ok it seems to be solved... I've copied, in a new field, the value of the first calculated field via a script. I've applied the trigger to this field that activate a dialog when the value in the triggered field is different from the value of the calculated field. hope that this could be usefull for somebody else. BTW thanx to everybody :thanks:

  • 1 year later...

Thank you for this thread, even if is old. It has just solved my problem anyway. i did not realise you could not trigger a script from a calculation field (RTFM).

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.