The basic function I need is for the parent element to have an attribute that is simply the value of the most recent update of any of the child elements attribute.

I thought the rollup function would work for this, but there are only summary values available. I would like it to just update with the latest value.

I also tried doing a calculation that used the PrevEvent of all child elements and finding the Interval between now and PrevEvent, then setting the value based on that, but couldn't get the syntax to work. Not sure if it is me or it is not possible...

time = '*'

time1 = PrevEvent('.\Child|attr',time)

time2 = PrevEvent('.\Child|attr',time)

time3 = PrevEvent('.\Child|attr',time)

timedelta1 = Int(time - time1)

timedelta2 = Int(time - time2)

timedelta3 = Int(time - time3)

val1 = PrevVal('.\Child|attr',time)

val2 = PrevVal('.\Child|attr',time)

val3 = PrevVal('.\Child|attr',time)

All of the above works, it's this last statement that I am unsure of. Also, there are 6 children, not 2. This is shortened for brevity.

If (timedelta1 < 5) Then ( val1 ) Else ( If (timedelta2 < 5) Then ( val2 ) Else (val3))

I have tried with and without parentheses to no avail.

Any help would be greatly appreciated.

Thanks,

Justin

Hi Justin!

Unfortunately there is no function that does what you want and the only solution I can imagine is using Analysis like you have done, however I would have done it a bit differently:

time1 = PrevEvent('.\Child|attr',time)

time2 = PrevEvent('.\Child|attr',time)

time3 = PrevEvent('.\Child|attr',time)

val1 = PrevVal('.\Child|attr',time)

val2 = PrevVal('.\Child|attr',time)

val3 = PrevVal('.\Child|attr',time)

MaxTS = Max(time1,time2,time3) // Returns the latest time stamp

For the last part you would need to found out which timestamp is the greatest and output the correspondent attribute value:

IF MaxTS = time1 THEN val1 ELSE

IF MaxTS = time2 THEN val2 ELSE val3

// IF MaxTS = time3 THEN val3 ELSE

I hope any of this helps!