Passing Parameters to Embedded View via Scripting - Perspective

Hi, I’m currently using Ignition 8.1.14 and I’m working on a Perspective project. I have a view that I’m using as a template and displaying in another embedded view. The view has a few view parameters that I’m using in the embedded view. For the time being, I’ve just manually inputted the value for each parameter on the embedded view, but I’m now trying to pass parameter values from one view to the embedded view via an onClick script. It works great if I’m passing to the template view; however, if I try to pass the values to the embedded view, it doesn’t work. I’ve posted screenshots of the views and their parameters and the script below. Can anyone point out what I’m doing wrong? I feel like I’m missing something very simple and am all ears to any suggestions. Thanks in advance!

The script that I’m using to pass only one parameter value to the embedded view via an onClick script:

The script that I’m using to pass the same parameter value to the view template via an onClick script:

The parameters of the embedded view:

And the parameters of the view template:

I think there might be a disconnect here, perhaps due to what seems to be loose usage of terms.

Embedded View is a type of component, whereas you seem to actually be performing navigation which would swap out the primary View of the Page for the “STN200” View, while passing along the params you specify in your script. Note that these params are passed to the VIEW, and not any component of that View. If you want the Embedded View to reference these param values and pass them to your “template” (templates aren’t a concept of Perspective, but I understand why you used that term here), then you need to bind those param values to the params of the View.

Your Property binding for EmbeddedView.props.params.OU would look like this`:


Oh my gosh, I feel so dumb. Definite disconnect there on my part. Added the view parameters to STN200 and works like a charm. Thank you so much for your quick response and assistance!

1 Like