Hi,
we are developing a custom module and for a given tag we are trying to get its configured properties. We are using getTagConfigsAsync for that, getting a CompletableFuture so from it we get a TagConfigurationModel list and from that we get a list of properties. Problem with that is for a given property (for example, “engUnit”) available method is getDefaultValue(), which does not return configured/current value (in Tag Browser I assigned to a tag %RH in Engineering Units but getDefaultValue().toString() returns empty string). What should we do instead to get current/configured properties values?
Many thanks in advance.
Carlos
To get the actual value for any tag property you need to turn around and call TagManager#readAsync
with a TagPath
pointing to the property you’re interested in.
edit: you might also try calling get(Property)
on the TagConfigurationModel
… could be easier if the model actually has the value, but I’m not sure.
Thanks for your response. Question using readAsync: for a tag which tag path is, say, [default]dairy/fan, tag path pointing to its “engUnit” property would be [default]dairy/fan/engUnit ? By doing that I still receive empty value and not the configured value.
Path would be [default]dairy/fan.engUnit
. You can use PropertyAlteredTagPath
to construct it.
Many thanks… I used the other approach, that is, calling get(Property)
on the TagConfigurationModel
… it brought the configured value. Thanks!
1 Like
When a tag property (for example toolTip) is bound to a parameter (for example param1), getBoundOrDefault(WellKnownTagProps.Tooltip) return : {bindType=parameter, binding={param1}}
getOrDefault(WellKnownTagProps.Tooltip) return : null
get(WellKnownTagProps.Tooltip) return : null
I need to obtain the resulting value. Is it possible ?
param1 value = “my param value”. I would like to get “my param value”
Did you found a solution for this case ?