I have tried to perform the function of subtracting or adding two EF attributes but all the options that I see only works for Elements attributes.
Hi Jaime, depending on what exactly you want to do, I would suggest using an output expression on the event frames to store the result. Refer to KB01884 - Output Event Frame Start Time, End Time, and Duration to a PI Tag .
I would store the value of both event frames attributes in two separate element attributes using the output expressions and use an analysis to trigger a third event frame when needed using either attributes as a trigger depending on your exact need that may need some tweaking.
Why not add / subtract using a formula attribute in your EF?
Roger Palmen your comment led me to explore the problem a bit more and apparently the mistake was from my side. I was trying to use attributes of type string which can not be used in Formula. So it is totally possible but it is not possible to compare strings with a Formula data reference.
I just wanted to clarify that it is expected for the formula data reference not to work with string and other non numeric data type. So not a product issue, just a known limitation:
Totally agree and understood!
Comparing strings is a tricky subject. You could get creative in using Replace and Len in StringBuilder DR to find out if strings are equal, but for more complex comparisons (wildcards, case-insensitive or sounds-like) you would need to look at extending PI with e.g. a custom DR.
Retrieving data ...