Define child element attributes in an expression using a concatenate function (or similiar)

We need to make analysis templates in AF where we bring values from child element attributes into a calculation at the parent template level.

 

Our AF structure is something like this: (with hundreds of iterations all matching the same structure)

Parent Nomenclature: A0 where A is the parent asset number. Ex 12010 or 151100

Child Nomenclature A x where x is either 1 or 2. Ex 12011, 12012, 15111, 15112 (ie 12011 and 12012 belong to parent 12010)

 

The issue is when we make an analysis template at the parent level and map a child attribute (ie 12011 flow) the path string for the child attribute doesn't work with the template at 15110 when applied.

 

The workaround we have now is to name the child assets only partially so that the template can be used consistently. Ie name the child assets as Child 1 and Child 2 rather than 12011 and 12012. This allows the templates to work but is a problem when reading the child asset name without the context of what parent it is under.

 

Is there a way to use a function like Concatenate to generate the string for the attribute path? If we could do this we could easily look up the correct child elements from the parent attributes and then the expression could be consistent in the template.

 

If this isn't clear I can try to explain a different way.

Thanks,

John

Parents
  • I have hit this issue many times and with many variations on this theme of having varying element names. (Missing Content)​ uses a solution I've used when names are not that important. For other cases, I have used the index property to search the elements property. Index is 1 based:

    To grab the first child element attribute use syntax: '.\Elements[@Index=1]|Attribute Name'. For the second child element, change replace the @Index=1 with @Index=2. Let us know if these solutions work and we can probably suggest other potential solutions.

Reply
  • I have hit this issue many times and with many variations on this theme of having varying element names. (Missing Content)​ uses a solution I've used when names are not that important. For other cases, I have used the index property to search the elements property. Index is 1 based:

    To grab the first child element attribute use syntax: '.\Elements[@Index=1]|Attribute Name'. For the second child element, change replace the @Index=1 with @Index=2. Let us know if these solutions work and we can probably suggest other potential solutions.

Children
No Data