Support Forums
Display Attribute of a Tag via parameters

Hello,

I am trying to get a Text to load a value of a main TAG. for example a AlarmHi attribute.

I have made some progress but I am having issues with the last little bit to get the final value.

The page has 2 parameters
Tag0(Tag)
TagAttribute(Text)

The one way I can get the expression to work on the text is:

Format(7,1, Tag0\AlarmHi)

What I want to happen is in the expression it will look like:

Format(7,1, Tag0 \ TagAttribute)

When I use this expression with both of the parameters in it the input area is white, so it is recognized as a valid expression. But there is no value displayed in the text box.

The end goal is to have one text box that I can change the parameter 'TagAttribute' to anything I want to see in a TAG and have it display.

I could manually type out the expressions each and every time, but if I need to do 50+ of them it would be easier to quickly change the tag and type an attribute.

Hello, I am trying to get a Text to load a value of a main TAG. for example a AlarmHi attribute. I have made some progress but I am having issues with the last little bit to get the final value. The page has 2 parameters **Tag0**(Tag) **TagAttribute**(Text) The one way I can get the expression to work on the text is: Format(7,1, **Tag0**\AlarmHi) What I want to happen is in the expression it will look like: Format(7,1, **Tag0** \ **TagAttribute**) When I use this expression with both of the parameters in it the input area is white, so it is recognized as a valid expression. But there is no value displayed in the text box. The end goal is to have one text box that I can change the parameter '**TagAttribute**' to anything I want to see in a TAG and have it display. I could manually type out the expressions each and every time, but if I need to do 50+ of them it would be easier to quickly change the tag and type an attribute.

The simple way to do this is to use the contact() function. Also, note that from VTScada12 onward, multi-lingual support requires users to reference text from a file. This is done using functions such as getphrase().

Have a look at those and see if you can solve this.

Examples: Concat( "The Cat Has ",[Cat\NumLivesLeft], " Left." )
Concat( "The cat is a ", GetPhrase([Cat]\Description), " Cat" )

The simple way to do this is to use the contact() function. Also, note that from VTScada12 onward, multi-lingual support requires users to reference text from a file. This is done using functions such as getphrase(). Have a look at those and see if you can solve this. Examples: Concat( "The Cat Has ",[Cat\NumLivesLeft], " Left." ) Concat( "The cat is a ", GetPhrase([Cat]\Description), " Cat" )

Trihedral Engineering Ltd.

edited Jun 20 '22 at 2:27 pm

Hello Dave,

I did try and use the Concat() a few different ways but it did not work.

concat([Tag0]\,\GetPhrase(TagAttribute))
concat(Tag0\,\GetPhrase(TagAttribute))

even Concat(tag0,\AlarmHi) did not work to pull the AlarmHi information. I am thinking that the program is not built to take a text expression with page parameters, and recognize that I want a Tag attribute.

the closest I got was:

concat(Tag0,\GetPhrase(TagAttrubute) but the result was AnalogStatusAlarmHi

or

concat(\GetPhrase(TagRoot),\GetPhrase(TagAttribute)) resulting in Testing Group\test Analog Status\AlarmHi

The last one was able to get the correct root path, but that is where I think the program does not have the capability to recognize that I want it to pull that root's information and not just print the text in the box.

Hello Dave, I did try and use the Concat() a few different ways but it did not work. *concat([Tag0]\,\GetPhrase(TagAttribute)) concat(Tag0\,\GetPhrase(TagAttribute))* even *Concat(tag0,\AlarmHi)* did not work to pull the AlarmHi information. I am thinking that the program is not built to take a text expression with page parameters, and recognize that I want a Tag attribute. the closest I got was: *concat(Tag0,\GetPhrase(TagAttrubute)* but the result was **AnalogStatusAlarmHi** or *concat(\GetPhrase(TagRoot),\GetPhrase(TagAttribute))* resulting in **Testing Group\test Analog Status\AlarmHi** The last one was able to get the correct root path, but that is where I think the program does not have the capability to recognize that I want it to pull that root's information and not just print the text in the box.
41
2
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft