AnsweredAssumed Answered

Analysis options when an input attribute might be Excluded

Question asked by AlistairFrith on Oct 10, 2018
Latest reply on Oct 10, 2018 by sraposo

Does anyone have any advice for the following scenario:

I need to create a number of analysis templates that use input attributes that might be Excluded but the analyses still need to work. For example, say I need to do a calculation which uses an actual process value if it is available and an estimation if it is not:

If exists(input1) then input1 * input2 else estimate * input2


There is no 'exists()' function so if input1 is Excluded then the whole analysis fails to run. I only see three options:

  1. Use a separate 'RobustInput1' attribute.
    1. RobustInput1 is a Hidden attribute using a Formula data reference configured like this: A=input1;[A]. If Input1 is Excluded then RobustInput1 will have a bad value but at least it exists.
    2. The analysis then becomes If BadVal(RobustInput1) then estimate * input2 else RobustInput1 * input2
  2. Make Input1 Hidden instead of Excluded. Then it will just return 'PI Point not found' or some similar error that we can check for rather than breaking the analysis entirely.
  3. Create 2 separate analyses for each half of the 'If', writing to new hidden attributes (part1 and part2), and a original analysis then becomes if BadVal(part1) then part2 else part1


Option 1 works but I don't like it: I believe formula data references are no longer advised and it ca produce an explosion of 'Robust' attributes if this comes up a lot. I also don't like option 2 since input1 represents a resource the the element legitimately does not have, which seems to be what Excluded was intended for. Option 3 seems just as bad as option 1: it creates an explosion of intermediate attributes and analyses, some of which would fail.


What I would like would be if analyses had a facility to use an attribute if it was available something like ValueOr('path to attribute that might be Excluded or otherwise not exist', 'alternative value')


Does anyone have any suggestions or alternative solutions for this scenario?


Thanks in advance,


--- Alistair.