dropConfig - UDT AND Data Type

Is it possible to setup dropConfig for UDT and Data Type on a single drop?

Goal: Bind UDT Instance / Copy UDT Instance Tag Path

(FYI - UDT works, but the Data Type remains blank.)

Parameters:
udtInstance

baseTagPath

dropConfig

udts
    [0]
    type:  udtDefinition
    param:  udtInstance
    action:  bind

dataTypes
    [0]
        type:  String
        param:  baseTagPath
        action:  path

Action: Drag udtInstance onto view, chose template.

Expected Results: UDT is bound. Data Type is tag path to the udtInstance.

Thanks for the feedback...

Fwiw, I wouldn't ever recommend binding to a UDT instance.

  1. You just get the values, no context. Eg can't get the units, format string, etc.
  2. You can't get the path to the UDT instance to, say, open up a popup for it or to reference the name of the UDT to use in a label or whatnot (guessing this is the reason for your post)
  3. You can't choose what to bind, you have to subscribe to every single tag
  4. It doesn't work with tags that have spaces in them

I'm sure there are more..

5 Likes

Nick -- Understood and Thanks for the info...

There's a couple things going on ... I need the baseTagPath to determine the path to other relative objects and the UDT's / Components have been designed to account for most of the other exceptions that were mentioned. (There are several embedded views that present the same data in multiple ways....)

...the dropConfig component prompt only seems to work on a UDT bind...

(FYI - The dataType dropConfig would be: String / baseTagPath / path w/baseTagPath defined as a value parameter.)

I'm still curious as to if UDT and Data Type can be mapped on a single drop?
(...or how to get the dropConfig component prompt to work for Data Type only?)

Just use tag paths as your parameters. Even if it means drop config won't help you everywhere.

With a tag path as a parameter, you can indirect bind for any other property you need.

2 Likes