# Collapsible table with parameter passing

**URL:** <https://forum.inductiveautomation.com/t/collapsible-table-with-parameter-passing/68118>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [January 2, 2023, 8:52am UTC](https://forum.inductiveautomation.com/t/collapsible-table-with-parameter-passing/68118 "2023-01-02T08:52:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dharani\_T](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@Dharani\_T](https://forum.inductiveautomation.com/u/Dharani_T)\
**Post date:** [January 2, 2023, 8:52am UTC](https://forum.inductiveautomation.com/t/collapsible-table-with-parameter-passing/68118/1 "2023-01-02T08:52:07Z")

</div>

Hi ,  
i would like to create a screen in perspective which is similar to the below pic.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/a/5a67504818866be5ba2c47aa057ae83483463c92.png)  
I have tried using table with subview property but i need a table in one view and subview in another view (which should be dynamic)  
Any ideas to achieve this functionality?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [January 2, 2023, 9:06am UTC](https://forum.inductiveautomation.com/t/collapsible-table-with-parameter-passing/68118/2 "2023-01-02T09:06:07Z")

</div>

It's not clear to me what you are trying to achieve. What do you mean by "subview in another view (which should be dynamic)"?

Can you mark up your image to show where this subview should be?

---

<div class="post-metadata">

**Author:** ![Dharani\_T](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@Dharani\_T](https://forum.inductiveautomation.com/u/Dharani_T)\
**Post date:** [January 2, 2023, 9:42am UTC](https://forum.inductiveautomation.com/t/collapsible-table-with-parameter-passing/68118/3 "2023-01-02T09:42:12Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/7/17d6bca074b62f960f88fa26871559bf7b47d492.png)  
red should be in main view  
blue should be in subview

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [January 2, 2023, 11:37am UTC](https://forum.inductiveautomation.com/t/collapsible-table-with-parameter-passing/68118/4 "2023-01-02T11:37:20Z")

</div>

So where are you stuck?  
You should have the following properties setup:  
`rows.subview.enabled : true`  
`rows.subview.viewPath : <viewname>` (the name of your subview which will contain the subview table).  
`rows.subviewExpansionMode : <as required>`

See the manual: [Perspective - Table - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/Perspective+-+Table#:~:text=Click%20to-,see%20the,-rows%20properties).

---

<div class="post-metadata">

**Author:** ![Dharani\_T](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@Dharani\_T](https://forum.inductiveautomation.com/u/Dharani_T)\
**Post date:** [January 2, 2023, 11:40am UTC](https://forum.inductiveautomation.com/t/collapsible-table-with-parameter-passing/68118/5 "2023-01-02T11:40:37Z")

</div>

> [@Transistor](#):
>
> rows.subviewExpansionMode :

my current setup:

View Table on subview expansion event:

```auto
	table = self.props.selection.data[0]
	self.view.params.Name= table["Name"]

```

my view:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/7/07a0799241bef4177dde26f63dcf78cd779e7ec5.png)  
But sub view works properly only when i click on the name value and then click on the arrow.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [January 2, 2023, 11:59am UTC](https://forum.inductiveautomation.com/t/collapsible-table-with-parameter-passing/68118/6 "2023-01-02T11:59:32Z")

</div>

> [@Dharani\_T](#):
>
> But sub view works properly only when i click on the name value and then click on the arrow.

So is your question, "How do I display a table with all subviews expanded?"

If that is the question then see the Table Component Functions on the same page, [Perspective - Table - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/Perspective+-+Table#PerspectiveTable-ComponentFunctions) and the `expandSubviews()` function in particular.
