How to access default parameter values on an embedded view

Hi all,

Question:
How to access default view parameters without pulling them into an embedded view?

Background:
I'm working on a project where I want to include some information on my templates that will be available to the parent view when they are embedded elsewhere in the project.

In the below image, I would want to read the DATA array from other objects on the view where I embedded the template.

The forum link below discusses how default values will be used inside of templates if nothing is passed from the embedded view. I want to know if there is a way to read those default values without overwriting them on the embedded instance.

Misc info:
Ignition perspective version 8.1.45

Thanks in advance for any light you can shed on this issue,

Alex

Not from outside, no.

From inside, you cannot tell whether the parameter value was defaulted, or was explicitly set/bound to a value that happens to match the default.

The linked topic is basically a design-time phenomenon, not a runtime feature.

Perhaps you could share more detail about what you are really trying to do.

You can if you read the json definition of the View :slight_smile: Unless I'm misinterpretting the question..

You'd have to read the definition of the outer view, and the inner view won't know which view it is embedded in.

1 Like

JS hacking might get you there
Eye Twitching GIFs - Find & Share on GIPHY

Hah!

My sister in Missouri would say "Show Me!"

So am i getting this right?

You have a parent view with X "templates"
And in your templates you want to read the default data from all the other templates inside the parent?

Sounds right I think

Its probably possible but, its so much easier and logic to just do it from the parent...

1 Like

Thanks for all your replies.
I think I didn't quite managed to convey what I wanted to accomplish.
The below image is from an example view that I set up. The labels on the right should read the DATA param from the embedded view on the left. Images of the relevant properties / bindings are placed under the components. What I want is for the lower example to work.

Here's how the embedded view's params are configured.

To elaborate a bit further on my intended application:
Everything is happening in the designer with scripts, there won't be any use for this data in runtime.
I'm developing a turn-key system for a client and I want to in some way stupid proof the process of adding additional sites / pieces of equipment. For this, I decided to add a "config" param where they could select whether certain pieces of equipment are present or not.
The next step is to create the tags for the site / piece of equipment via the script. What I wanted to do was have every embedded view that could turned on or off by the config param have a read only param with what tags or UDTs are required for it.

This could also be handled with a list somewhere, but a parameter seemed to be the best way to associate the type of data required directly with the user of that data.
Hopefully this is a somewhat clearer explanation of my objective.

Yup, got it. No way to do that, short of parsing the view definition on the filesystem.

Roger that.
Thanks for your time and insights.