getTagConfigsAsync - default properties are null?

ignition80
#1

When I use getTagConfigsAsync, all non-default value of property are null for tag inside UDT

the flag recursive - set to true to return all TagEditModels under a TagPath. Useful for returning edit models for child tags under a UDT.
has no effect ??

Did I miss anything ?
Or is there another way to read all resulting properties of a tag which is inside an UDT ???

            CompletableFuture<List<TagConfigurationModel>> liste = gatewayContext.getTagManager().getTagProvider("default").getTagConfigsAsync(readTags1,true,false);

            List<TagConfigurationModel> tagConfigs  = liste.get();

            for (TagConfigurationModel tagConfig : tagConfigs){


                logger.info("getName={}",tagConfig.getName());

                logger.info("Tooltip={}",tagConfig.get(WellKnownTagProps.Tooltip));
                logger.info("HistoryEnabled={}",tagConfig.get(WellKnownTagProps.HistoryEnabled));
                logger.info("EngUnit={}",tagConfig.get(WellKnownTagProps.EngUnit));
                logger.info("EngLow={}",tagConfig.get(WellKnownTagProps.EngLow));
                logger.info("EngHigh={}",tagConfig.get(WellKnownTagProps.EngHigh));
                if (tagConfig.get(WellKnownTagProps.Path) != null){
                    logger.info("toStringFull={}",tagConfig.get(WellKnownTagProps.Path).toStringFull());
                }
``
0 Likes

Ignition 8 retrieval of bound properties
#2

Use getBoundOrDefault or getOrDefault on each key from the property set.

1 Like

#3

@PGriffith,@mgross

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 woulld like to get “my param value”

0 Likes

#4

You have to do a readAsync call on the bound property. Like so:

TagPath path = TagPathParser.parse("[default]Basic UDT instances/BasicUDT_Instance0/MemberEventScriptTag.documentation");
List<QualifiedValue> qv = tagManager.readAsync(Arrays.asList(path)).get();
Object boundParamVal = qv.get(0).getValue();
2 Likes