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.