# Passing parameters to nested and embedded views

**URL:** <https://forum.inductiveautomation.com/t/passing-parameters-to-nested-and-embedded-views/60872>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [June 17, 2022, 4:35am UTC](https://forum.inductiveautomation.com/t/passing-parameters-to-nested-and-embedded-views/60872 "2022-06-17T04:35:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [June 17, 2022, 4:35am UTC](https://forum.inductiveautomation.com/t/passing-parameters-to-nested-and-embedded-views/60872/1 "2022-06-17T04:35:41Z")

</div>

I have two views (say "a" and "b") embedded inside a view (say "c") having a breakpoint container having embedded views "embedded" for "a" and "embedded\_0" for "b". This "c" view is embedded inside a flex repeater view "d" which is bound to a named query returning JSON. Only "d" view has a page associated with it, others are pure views without pages.

I want that flex repeater in view "d" to pass two parameters returned from json object from DB query into view "c" having breakpoint container, which inturn will pass these two parameters to embedded views "embedded" and "embedded\_0" which will then pass them to views "a" and "b" depending upon which ever is visible in the breakpoint container.

So I defined two input parameters (say x and y) in the "a" and "b" views and added them in the properties of embedded views "embedded" and "embedded\_0" using parameter sync option and given initial values to x and y parameters. It works fine up to this. (the views "a" and "b" receive proper values of x and y as given in their initial values in "embedded" and "embedded\_0" view properties.

Now I need to pass these parameters x and y from view "c", to "embedded" and "embedded\_0" views. How to do that? I am confused whether to define x and y as parameters as well in "embedded" and "embedded\_0" views and add them as properties in "c" and sync them as parameters? I have to also get these parameters from the flexrepeater view "d" above it in to view "c". I am facing same situation here how the x and y parameters should be passed from "d" to "c" .

Can someone please explain how the parameter passing works in a nested views scenarios?

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [June 17, 2022, 8:53am UTC](https://forum.inductiveautomation.com/t/passing-parameters-to-nested-and-embedded-views/60872/2 "2022-06-17T08:53:53Z")

</div>

I don’t have a keyboard, so only short reply…  
But, simply, yes you will need to create x and y params in view c, then bind embedded a and b’s x/y params to c’s.  
In the view repeater, your props.data should return keys x and y with their values  
Eg

```auto
[
{'x' : 123, 'y' : 321},
{'x' : 986, 'y' : 661} 
]

```

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [June 17, 2022, 10:59am UTC](https://forum.inductiveautomation.com/t/passing-parameters-to-nested-and-embedded-views/60872/3 "2022-06-17T10:59:15Z")

</div>

Thanks for the reply. So binding is the key step which I was missing. Let me try and will update.

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [June 17, 2022, 4:52pm UTC](https://forum.inductiveautomation.com/t/passing-parameters-to-nested-and-embedded-views/60872/4 "2022-06-17T16:52:53Z")

</div>

> [@nminchin](#):
>
> you will need to create x and y params in view c, then bind embedded a and b’s x/y params to c’s.

created x,y parameters in view "c" but unable to bind them to x,y parameters of views a and b as I can't see them in properties list while binding!

Parameter passing works fine for one level of nesting of two views as explained in [IU video.](https://inductiveuniversity.com/videos/input-and-output-parameters/8.1) . However if there is another view above that, it doesn't seem to work!

If the top view is an embedded view, or a flex repeater view, then this view doesn't show parameters for it in the property editor! Very frustrating!

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [June 17, 2022, 6:11pm UTC](https://forum.inductiveautomation.com/t/passing-parameters-to-nested-and-embedded-views/60872/5 "2022-06-17T18:11:42Z")

</div>

Are you binding `a.props.params.x` in the embedded a view?  
You should see `view.params.x` and bind it to that. Otherwise, can you show screenshots of your c’s and embedded a’s props?

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [June 18, 2022, 4:41am UTC](https://forum.inductiveautomation.com/t/passing-parameters-to-nested-and-embedded-views/60872/6 "2022-06-18T04:41:02Z")

</div>

Yess! You have made my day!  
Thanks a lot!
