getTagConfigsAsync - default properties are null?

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());
                }
``

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

1 Like

@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”

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