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

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

Recommended Posts

Posted

I want to auto populate a field (LastModActiveStatus) with the current date everytime a calculation (Active_StatusSum.c) changes value from "0" to "1". If it weren't a calcualtion field I could use a trigger script but because it's a calc field I don't how to accomplish this... is it even doable? See attached zip example.

LastModifiedAutoPopulation.zip

Posted

What is the purpose of this. No an unstored calculation does not update a field but the same criteria can be used to set via a script trigger. Another option is to put the current date on the layout and then use conditional formatting to display it, but again I dont know what the purpose is here.

Posted

When I new record is added, we consider that person to be active. Anytime a person signs up to attend an event (for example) we also consider them to be active. For 18 mos we consider them active--after which, if they no longer attend events we consider them inactive. The calculations I use automatically flag the active field with a check based on either scenario (if a new record is created or if they attend an event or other function that I did not include in this example such as participate in a collaboration, etc).

I am told there are times when the endusers need to know when that active field was last modified. You mentioned the possibility of doing this with a script trigger? I tried using a script trigger earlier but it only seemed to work when I manually entered the field... and in this scenario I'm not entering field because it auto populates. Any ideas?

Posted

This would definitely solve my problem if I can somehow incorporate child fields from multiple tables. How would I modify the calculation to include child values from multiple tables rather than a single table?

Posted

Max ( Parent::ModificationTimestamp ; Max ( Child1::ModificationTimestamp ); Max ( Child2::ModificationTimestamp ) ) ?

  • 2 weeks later...
Posted

This was very helpful for a situation I'm faced with. But, I need to take it one step further. Can I populate my Parent field (e.g., parent::currentStatus) with data from another field in the record associated with the "Max" timestamp.

For example, I have a group of gang members who are seeing case managers. As they progress through the system I want to leave a bread trail of their activity so I have set up a table for their "status" and the dates reached. But I need to know their current status for use in reporting and for use on the user's layout. So, I can get a field to populate with Max (child::timestamp), but I would like the field to instead get their status from the record attached to that timestamp (e.g., child::status).

Can this be done? Thanks.

Posted

Surely their current status will be the last related Status record? Use the Last() function.

Posted

Vaughan, I appreciate your offering. But, I don't see this as a fool-proof solution. If they go back to the table of entries and edit an older entry it becomes the "Last" record. Anyway to embed "Last" or "Max" into a Calculation so that it "Gets" child::status of the "Max" record?

Posted

If they go back to the table of entries and edit an older entry it becomes the "Last" record.

Not necessarily. Last() gets the data from the last (non-empty) related record, according to the sort order of the relationship. If your records are entered in chronological order and the relationship has no overriding sort order, or if your records have a Date field and the relationship is sorted by this field, ascending, Last() will retrieve the current status.

Otherwise have a look at:

http://www.briandunning.com/cf/908

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