AnsweredAssumed Answered

Problem trying to access a second level attribute value from third level attribute

Question asked by wilson.laizo on Jul 27, 2017
Latest reply on Aug 1, 2017 by avanfosson

Hello;

 

We have the following AF structure:

Element

- PI Servers (value TESTSERVER)

- Attribute 1

-- Attribute 2 (value TAGTEST)

--- Attribute 3

-- Attribute 4 (value TAG1)

 

What we want is to use the value from Attribute 4 (second level attribute) to compose the tag name that is used on Attribute 3. For that we tried the following config string:

\\%@|PI Server%\%@..|Attribute 4% - %Attribute%

The expected result was:

\\TESTSERVER\TAG1 - Attribute 3

But what we get is:

\\TESTSERVER\%@..|Attribute 4% - Attribute 3

In this case, the value of the attribute PI Server is replaced correctly, and the value for the %Attribute% is also replaced correctly. But instead of replacing the text %..|Attribute 4% for the value of that attribute, it will just keep the text %..|Attribute 4% as part of the PI Point reference, which generates an error.

If we replace the string for:

\\%@|PI Server%\%..|Attribute% - %Attribute%

It will replace the text correctly replacing %..|Attribute% for Attribute 2, but when we try this:

\\%@|PI Server%\%@..|Attribute% - %Attribute%

It will again not replace %@..|Attribute%

 

So, can you guys tell us the correct way on doing that reference?

Btw, if we do the same thing on the second level, it will work correctly, as an example, if we use the string:

\\%@|PI Server%\%@Attribute 4% - %Attribute%

on Attribute 2, it will work correctly giving the result:

\\TESTSERVER\TAG1 - Attribute 2

Outcomes