# Customizing table component in persepective

**URL:** <https://forum.inductiveautomation.com/t/customizing-table-component-in-persepective/62159>\
**Category:** Ignition\
**Tags:** perspective, ignition81\
**Created:** [July 21, 2022, 12:57pm UTC](https://forum.inductiveautomation.com/t/customizing-table-component-in-persepective/62159 "2022-07-21T12:57:55Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sri\_Haran](https://avatars.discourse-cdn.com/v4/letter/s/c77e96/32.png) [@Sri\_Haran](https://forum.inductiveautomation.com/u/Sri_Haran)\
**Post date:** [July 21, 2022, 12:57pm UTC](https://forum.inductiveautomation.com/t/customizing-table-component-in-persepective/62159/1 "2022-07-21T12:57:55Z")

</div>

Hello All,  
Here I’m in need of a 5 column where 4 will come from database that i can take though named query,  
and remaining one column i need to check a tag timestamp if the tag timestamp is 5mins lesser than the current\_timestamp i want to indicate in the column as Active elif if the tag time\_stamp exceeds 5 mins then the column should be InActive ,and how to add two datasources in table component  
Any suggestions would be appreciated,  
Thanks,  
Sri

---

<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:** [July 21, 2022, 1:02pm UTC](https://forum.inductiveautomation.com/t/customizing-table-component-in-persepective/62159/2 "2022-07-21T13:02:54Z")

</div>

I would use a query binding on the table data and then use a script transform to add your new column to it

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [July 21, 2022, 1:33pm UTC](https://forum.inductiveautomation.com/t/customizing-table-component-in-persepective/62159/3 "2022-07-21T13:33:20Z")

</div>

There’s only two real ways to do it - post getting the data, like @nminchin mentions via a script transform, or putting the logic inside the query directly. I’m kind of a fan of putting this sort of logic inside the named query itself as I feel its easier to do this in SQL than inside a script transform, but that’s personal preference.

If you will need dataset with the 5th column in more than one spot then I highly recommend putting inside the named query directly otherwise you will need to add script transforms in every spot you need this 5th column.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [July 21, 2022, 1:43pm UTC](https://forum.inductiveautomation.com/t/customizing-table-component-in-persepective/62159/4 "2022-07-21T13:43:37Z")

</div>

Can’t check a tag’s timestamp with a named query though, or am I missing something ?

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [July 21, 2022, 1:44pm UTC](https://forum.inductiveautomation.com/t/customizing-table-component-in-persepective/62159/5 "2022-07-21T13:44:36Z")

</div>

Correct, I misread the original question. Disregard what I said. Go with a script transform.

---

<div class="post-metadata">

**Author:** ![Sri\_Haran](https://avatars.discourse-cdn.com/v4/letter/s/c77e96/32.png) [@Sri\_Haran](https://forum.inductiveautomation.com/u/Sri_Haran)\
**Post date:** [July 21, 2022, 1:50pm UTC](https://forum.inductiveautomation.com/t/customizing-table-component-in-persepective/62159/6 "2022-07-21T13:50:50Z")

</div>

Dear @bkarabinchak.psi  
Thanks for the response  
where to write those script transform

---

<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:** [July 21, 2022, 2:44pm UTC](https://forum.inductiveautomation.com/t/customizing-table-component-in-persepective/62159/7 "2022-07-21T14:44:30Z")

</div>

> [@nminchin](#):
>
> I would use a query binding on the table data and then use a script transform to add your new column to it

Up up

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [July 21, 2022, 3:30pm UTC](https://forum.inductiveautomation.com/t/customizing-table-component-in-persepective/62159/8 "2022-07-21T15:30:49Z")

</div>

You might want to go through the tutorials (I think it’s called inductive university) and documentation.

Transforms are added to binding, when on the binding configuration window.

---

<div class="post-metadata">

**Author:** ![Sri\_Haran](https://avatars.discourse-cdn.com/v4/letter/s/c77e96/32.png) [@Sri\_Haran](https://forum.inductiveautomation.com/u/Sri_Haran)\
**Post date:** [July 21, 2022, 3:57pm UTC](https://forum.inductiveautomation.com/t/customizing-table-component-in-persepective/62159/9 "2022-07-21T15:57:52Z")

</div>

That’s fine i understood but how to bind the 2 data which is tag value to the existing table with a data source from named query

---

<div class="post-metadata">

**Author:** ![Sri\_Haran](https://avatars.discourse-cdn.com/v4/letter/s/c77e96/32.png) [@Sri\_Haran](https://forum.inductiveautomation.com/u/Sri_Haran)\
**Post date:** [July 28, 2022, 10:06am UTC](https://forum.inductiveautomation.com/t/customizing-table-component-in-persepective/62159/10 "2022-07-28T10:06:53Z")

</div>

Hello all i closed this by using a template and custom properties,  
to all who shared your ideas  
Thanks  
Sri
