Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

No. However, it is possible to trigger a script when one of the fields referenced by the calculation field changes, if that change happens through a field on a layout. Can you explain any more details of what you're trying to accomplish?

Posted

I'm working in an order record. I have a text field called 'Pay Status'. I have a calculation field called 'Amount Due'. When amount due equals 0 I'd like to run a script to set 'Pay Status' to 0. I have the script triggered by the 'Amount Paid' field, which is a number field. However, there are some instances when no pay is required for an order (comps, replacements, etc). In these instances, I don't want the 'Pay Status' to remain as 'Unpaid'. I would like to have the script triggered as well. However, since the 'Amount Paid' field is never activated, the script doesn't trigger. I'd like to avoid layout script trigger work arounds.

Posted

You can do that with an auto-enter calculation. Give your "Pay Status" field an auto-enter calculation like this:

 

If ( "Amount Due" = 0 ; 0 ; /* Else */ Self )

 

... and set the auto-enter to replace the existing value in the field. You may encounter some refreshing problems if the "Amount Due" calculation is based on fields in other tables, in which case you should consider attaching script triggers to the other fields used by "Amount Due" in addition to "Amount Paid".

 

Script triggers attached to layouts and layout objects are not "work arounds."

Posted

I was under the impression that an auto-enter calculation only triggers on record creation. Is this correct? Or can it be re-triggered? Can you explain your example more to me?

 

 Ideally, I'd like to have three statuses: Paid, Partial, Unpaid

 

What I meant about the work around, is that I'd prefer to have the status field live update while users are working in the record and not  have to rely on the layout exit or enter script trigger to set the status field. 

Posted

I was under the impression that an auto-enter calculation only triggers on record creation. Is this correct? Or can it be re-triggered? Can you explain your example more to me?

 

Depends on whether or not you deselect the button (after clicking ok) that reads "Do not replace exiting value (if any)

 

 

 

This topic is 4228 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.