# Dynamically update table rows based on selection

**URL:** <https://forum.inductiveautomation.com/t/dynamically-update-table-rows-based-on-selection/62530>\
**Category:** Ignition\
**Tags:** ignition81, scripting, perspective\
**Created:** [August 1, 2022, 6:51am UTC](https://forum.inductiveautomation.com/t/dynamically-update-table-rows-based-on-selection/62530 "2022-08-01T06:51:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Killmonger](https://avatars.discourse-cdn.com/v4/letter/k/3da27b/32.png) [@Killmonger](https://forum.inductiveautomation.com/u/Killmonger)\
**Post date:** [August 1, 2022, 6:51am UTC](https://forum.inductiveautomation.com/t/dynamically-update-table-rows-based-on-selection/62530/1 "2022-08-01T06:51:29Z")

</div>

Hi there!!  
I have a table from my perspective view. I have 2 columns that are fixed. Let’s say the name of the ingredient and weight. I have several filters that I want to apply to this table. Let’s say I use a recipe filter. I have 5 intermediate ingredients for Recipe A, and for recipe B, I have 8 intermediate ingredients. I want to display information about recipe A (only 5 rows across 2 columns) when I select recipe A, and similarly(8 rows across 2 columns) for recipe B. And when I select both A and B, I want to show all (8+5) rows and lesser if any of the ingredients are common in both recipes. And for the common ingredients, I want the average of weights in the second column let’s say.

I am okay with achieving the same with tag history calculations in scripting…else I am also recording my data in my SQL table. In my SQL table, I am recording all unique ingredients as columns in my table. So for Recipe A, out of 50 columns(total), I want to fetch 5 columns’ names and values into my two columns in the table of perspective view. The other 45 columns in the row of Recipe A will be ZERO(not null), this is my only check to identify for which recipe, and what columns to take.

Kindly help. Kindly try to elaborate a bit while answering.

Thanks!

---

<div class="post-metadata">

**Author:** ![Kevin\_Tulloch](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin_tulloch/32/39631_2.png) [@Kevin\_Tulloch](https://forum.inductiveautomation.com/u/Kevin_Tulloch)\
**Post date:** [October 19, 2022, 9:35pm UTC](https://forum.inductiveautomation.com/t/dynamically-update-table-rows-based-on-selection/62530/2 "2022-10-19T21:35:29Z")

</div>

Hi [Killmonger](https://forum.inductiveautomation.com/u/Killmonger),

It sounds like a Flex Repeater component might help. You can use this component with a View that acts as a table row. See more about the Flex Repeater here: [Perspective - Flex Repeater - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/Perspective+-+Flex+Repeater)
