on ‎2009 Feb 19 1:15 PM
I'm using a repeater on a SQL query that returns a list of tags that I need to check the history for using a tag query. I pass the tag name from the first repeater into the tag query and return the last x amount of minutes of history for the given tag. When I do a repeater on the tag history, the name of the column that returns the value is the name of the tag that was passed in. How do I get the tag values if the column name keeps changing?
Ex. Repeater1.Output{/Row/*tag name*}
The *tag name* part keeps changing and I can't get the results that I want for all tags that I need the history for.
Please help. Thanks.
Eric
Request clarification before answering.
Eric,
have you tried to use a "dynamic link"?
[SAP Help on MII Expression Editor|http://help.sap.com/saphelp_xmii120/helpdata/en/45/b89adfaf1447f7e10000000a114a6b/content.htm]
This way you can build your XPATH expression using variables. Example: say the Tag name is stored in the variable "YourVariable". Using the "#" sign around the variable, MII evaluates the variable value before evaluating the XPATH:
Repeater1.Output{/Row/#YourVariable#}Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Eric,
Definitely use the dynamic expression as Mike suggests.
One other issue to be aware of. MII (actually I think it is xml) does not like tag names which begin with numbers. Unfortunately there are many data historian tags which have numbers as the first character. Here is a fix for that situation which you may run into:
Good luck,
Mike
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.