Skip to Content
avatar image
Former Member

Dynamic Tag Query with dynamic tag name.

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Aug 06, 2007 at 03:47 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.

  • Aug 07, 2007 at 12:11 AM

    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

    Add comment
    10|10000 characters needed characters exceeded