Single tag, tag-drop Perspective template

I want to create a Perspective template as shown below, to be able to embed multiple occurrences of it on a view and drop tags onto each one. The template would then use the tag.Name, tag.Value, tag.formatString, tag.Units and tag.ToolTip, etc. (or whatever the proper property names are).

Perspective template

I’ve read through the documentation and the forum examples but can’t figure out how to set up the view’s dropConfig and how to bind each label to the tag.

There is no option to select a tag as a parameter. Do I pass the tag path as a string?

Can anyone help?

A couple of notes about setting up tag-drops:

  1. Our settings allow for specifying what components should be used for a tag value type, ie: When I drop a tag which has a value which is an integer, I want to select from X, Y, Z component types (usually Label, Numeric Entry Field, Slider - something like that).

  2. Our settings allow for specifying when using a component what properties of that component should then be bound to the tag which was dropped, ie: props.value or props.text.

We don’t have a way to configure “when I drop a tag, use MyView as the template”. The closest you’re going to get right now is the following:

For the tag value type you plan on dropping, specify you would like to have the option to use an Embedded View.
Screen Shot 2020-11-24 at 9.10.30AM

Next, you should specify that when an Embedded View is used, we should bind the path of the tag to props.params.tagPath of the Embedded View we will use.
Screen Shot 2020-11-24 at 9.21.53AM

Now, you should build a View where you configure a param value of tagPath:
Screen Shot 2020-11-24 at 9.23.53AM

From here, what you need to do is build out the components of the View to bind against the Tag Path specified in the param (it is at this point tat you would specify .value or .quality or .name as part of the tag path.

Screen Shot 2020-11-24 at 9.26.56AM

The only remaining step is to actually manually set EmbeddedView.props.path to the View which houses your components.

Super! Thank you for your time on this. I will update with anything I learn on the matter.

I’ve worked out a good-ish solution for this and posted it on Creating a Perspective tag-drop view (almost) [solution].

Thanks again.