cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Tag Query with dynamic tag name.

Former Member
0 Kudos

Hi,

In our implementation we have 10+ users. Each one want to monitor only one production line ( eg. one tag value ) in the dashboard by default when they login.

I was able to design this requirement CONCEPTUALLY but facing some trouble technically.

Here is my issue.

Tagname will be coming from one of the BLS Transaction input parameters (Transaction.Tagname). I am able to build tag query using xMII Tag Query block, able to configure repeater. Here is the spot where I was struck. While assigning tag value to XML Row

i.e IlluminatorRow_0.Tagvalue = Repeater_0.Output{/Row/AssetUtil1}.

In the above assignment link it requires a hardcoded tagname. In my case it will be dynamic. I tried different ways like

1. IlluminatorRow_0.Tagvalue = Repeater_0.Output{/Row/@Transaction.Tagname}.

2.IlluminatorRow_0.Tagvalue = Repeater_0.Output{/@Transaction.Tagname}.

But no luck.

Can someone help in how to do this dynamic tagname assignment.

Thanks,

Srinivasa.

Accepted Solutions (1)

Accepted Solutions (1)

jcgood25
Active Contributor
0 Kudos

Please search the forum - this has been asked before.

Since it is a tag query the first column is DateTime and the second column will always be the tag you've asked for.

Repeater_Output{/Row/*[2]}

Regards,

Jeremy Good

Former Member
0 Kudos

Jeremy,

Thank you Jeremy it worked.

I searched the forum. I think my search terms are not good enough to pull the threads which are related to this answer.

I used "Dynamic Tagname","Dynamic Tag" and "Tag Name runtime". Each one of them number of threads but I couldn't find what I want. I am listing these terms here for form for future search.

Thanks again.

Srinivas.

Answers (1)

Answers (1)

sufw
Active Participant
0 Kudos

Hi Srinivas,

another option is to use "Dynamic Links" which from your sample code is what you were trying to do. For this, the proper syntax is:

Repeater_0.Output{/Row/#Transaction.Tagname#}

Make sure that the tag name you pass to the historian is the same as the tag name returned by the historian as part of the data set, and make adjustments for that. For example, some historians escape non-alphanumeric characters when they process your request (e.g. passing "abc.def 12-rt" as the tag name can be returned from the historian as "ABC.DEF_12_RT", etc.).

Hope this helps,

Sascha