October 13, 200916 yr 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?
October 13, 200916 yr Why not trigger the script when the "other" field is not equal to the value? (IOW forget the calculation field.)
October 14, 200916 yr Author thank you, maybe this could be usefull in a future upgrade... thank you anyway
October 14, 200916 yr 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
October 14, 200916 yr Attach the script trigger to the layout (OnRecordCommit) or to the individual value fields.
October 14, 200916 yr 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:
October 14, 200916 yr 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:
July 30, 201114 yr 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