Creating Full Tag Path in Custom Properties

We have used the bindings and custom properties on buttons to modify a button that works best for our application. To reduce the time to implement the buttons and reduce errors we have created Custom Properties that bind to various tag properties.
We would like bind a Custom Property to a Tag’s full-path, i.e. [default]/folder/tagname. How can this be done?

It is easy to bind to the “Name” property. Unfortunately, “Name” is incomplete since it doesn’t contain the folder information.

Vision or Perspective? (You should tag your question with the appropriate one so that you attract the right experts.)

If it’s Perspective then see if Tag Drop would help.

Is this what you want?

Consider reversing your logic, because there’s no supported way extract the tag path of one property’s binding into another. Instead, supply the tag path as a string property. Use that in an indirect tag binding where you need the value, and use it as the prefix in an indirect tag binding where you need other properties from that tag.


I’m curious how OP is using the button without this :thinking:

I am using Vision.
We have multiple bindings on different tags. Yes, we can change each binding one at a time. However, it is very obvious that being able to group multiple bindings together and reference them to a single tag would result in obvious time savings and reduce errors. The Custom Property field and Indirect Tags seems like the tools that were given to do this. Unfortunately, it does not seem possible to bind to the full tag path easily (yes I could type it in by hand). I find it surprising that I can bind to something of marginal value, say Deadband but I can’t bind to the full tag path which would have high utility.

But what deadband do you bind on ? You need a source of some sort !

I think @pturmel is right (he usually is).
You should try doing it the other way around: pass the full tag path to your view/component/template/whatever, and use this to get everything else. Making a generic view that gets all the properties you could ever want or need becomes trivial when you have the full path.

Yes but you are therefore either using a direct tag binding in which case you’re supplying the binding with the full tag path, or you’re using an indirect tag binding in which case you’re supplying the full tag path partially statically and with 1 or more expressions that create the path.

In both cases, you’re supplying the full tag path somehow. Why can’t you use that “somehow” as your full tag path?

If you’re not using a Template (sounds like you’re not), then it sounds like you should be adding custom properties to the button where you can paste your tag path (or partials) into. Then you would use these custom properties in your tag bindings on the button. This way you have access to the tag path.
Additionally, it also means that then your tag path isn’t bound up within a binding and you can see the string directly from the properties panel rather than having to open up the binding editor each time.
You can then also append onto the supplied tag path(s) to get the value of the relative tags or their properties that you need

Could you pass this on to my wife, please? :grin:


LOL, unless @pascal.fragnoud is your wife’s wife, then aint no way that’s going to work! :laughing:

Yes, I am understand direct binding and I understand indirect addressing.

Let me rephrase my question. I have a button. I create a Custom Property: Name “Full Tag Path”, Type “String”. What is the easiest way to pass the full tag path “[default]folder/tagname” to the Custom Property, besides typing it in manually?

I have a component (button). I have two tags binding to multiple properties, e.g. Color, Enabled, Visible, Mouseover Text, Cursor, etc. and it also sets the tag value to 1. I can reuse the button by changing all the bindings…time consuming and I might miss one of the bindings.

Obvious answer: Emulate standard programming practice. The button becomes a function, I set up all the bindings using indirect addressing and then I only pass it two parameters, the full tag path for the two tags I am binding to. All the multiple bindings point to the two tags. As a bonus, the tags are easily visible in the Custom Properties section, reducing errors.

Is this not exactly what you have asked for?

If you create a UDT structure for your tag pairs you can then use the built in expression type tags in the UDT to expose the tag paths.
Then create a template with the button on it and bind it to the UDT type.
This way when you drag and drop the tag to a window it will have the button template selected and autofill everything you are looking to do.

You can copy the tag path from the tag browser, right click on tag, copy path.

Yes to all of this, this is the reason you would use custom props with the minimum num of tag paths required passed in

I still never do this. There are definitely good reasons not to on Vision, but I admit I haven’t even looked to use them in Perspective so I don’t know if the same limitations apply. I always pass in the tag path to the UDT and indirectly bind to that

To josborn. Yes, thanks that is exactly what I am looking for. I just type “.Path” after selecting the path.
To all thanks for the replies.

To be honest, this seems like unnecessary load you’re putting on the gateway by creating a binding to the tag path, when you could just paste it in. Whether you select the tag from the binding or you copy it from the tag browser (it’s probably quicker from the tag browser as you most likely already have it open in the right folder anyway), using a binding will create extra load and impact performance both client side and server side as opposed to just pasting the copied tag path in. Better to design for efficiency at the start than have to go back and fix things after the fact imnsho


Copying is also quicker. Is there short-curt for copying the tag path from the designer, instead of right-clicking and selected “Copy Path”?

I’ve tried using telekinesis to move the tag path into where I want it but haven’t been successful yet, Ill let you know though. (that’s a no - right click copy is pretty darn quick :slight_smile: )

1 Like

Make sure you put your secret key in your environment variables, otherwise the handshake fails.

We have people still using vi because it is more efficient than GUI editors. Shortcuts and Hotkeys exist because there are people for whom pretty darn quick is to slow!