cancel
Showing results for 
Search instead for 
Did you mean: 

Tags & Tag query MII 12.0

Former Member
0 Kudos

In my three years of using MII, this is the first time getting and setting tag names and values. It seems pretty straight forward, but I need to know how to call the tags when the tags are presented in a tree like fashion in the query.

For example:

This is the tree in the available groups of the tag query details

-->STA01

-


>Session1

-


>Session_To_MII

-


>Data1

-


>Data2

-


>Data3

-


>Data4

-


>Session2

-


>Session3

-


>Session4

-->STA02

-->STA03

In javascript, I need to getTagValue from Data1, but I need to setTagName to Data1. What is the naming scheme in javascrpt that allows me to do this?

Is it STA01_Session1_Session_To_MII_Data1 because I may have to go to Session 2 or I may have to go to STA02, Session3. If there is a simple naming scheme, then I can create a generic high level tag query and I could get and set names and values all day.

Thanks for all of the help in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

jcgood25
Active Contributor
0 Kudos

Chip - the javascript format can be found in the script assistant

document.APPLETNAME.getQueryObject().setTagName(x,"ABC");

document.APPLETNAME.getQueryObject().setTagValue(x,"123");

The indexes match up and you'll see this on the values tab - they line up with selected tagnames, so you should just be able to match the name of the tag showing up in the TagList (same as what you need to use to query for Current values).

Former Member
0 Kudos

Believe it should be in the format STA01.Session1.Session_To_MII.Data1. Use a repeater logic to extract all the tag values within a group.

Chanti.

Former Member
0 Kudos

So this has to be a BLS? I was trying to establish the handle in Javascript. Is it possible to do this in javascript?