# Add Column and rows to dataset from tag

**URL:** <https://forum.inductiveautomation.com/t/add-column-and-rows-to-dataset-from-tag/62797>\
**Category:** Ignition\
**Tags:** scripting, ignition81, perspective\
**Created:** [August 8, 2022, 7:52pm UTC](https://forum.inductiveautomation.com/t/add-column-and-rows-to-dataset-from-tag/62797 "2022-08-08T19:52:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jwilliams](https://avatars.discourse-cdn.com/v4/letter/j/c2a13f/32.png) [@jwilliams](https://forum.inductiveautomation.com/u/jwilliams)\
**Post date:** [August 8, 2022, 7:52pm UTC](https://forum.inductiveautomation.com/t/add-column-and-rows-to-dataset-from-tag/62797/1 "2022-08-08T19:52:27Z")

</div>

I have a Flex Repeater populating based on a query binding on the instances property with return format json as follows:

```auto
select job_number as JobNumber
from jobs

```

This correctly populates the Flex Repeater component with every Job on my database, however I have a State value for each Job that is only located on a tag. I am wanting to add that State column to the returned query data. I assume the best way to accomplish this is to change my return format to dataset and loop through each of the [default]Job/Job 1/State…[default]Job/Job 10/State tags and then add each state to the corresponding Jobs row. My current dataset with only the query looks like this:

| JobNumber |
| --- |
| 1 |
| 2 |
| 3 |
| 4 |
| 5 |
| 6 |
| 7 |
| 8 |
| 9 |
| 10 |

And I need to add the State to the dataset to look something like this:

| JobNumber | State |
| --- | --- |
| 1 | 1 |
| 2 | 0 |
| 3 | 0 |
| 4 | 0 |
| 5 | 1 |
| 6 | 0 |
| 7 | 0 |
| 8 | 0 |
| 9 | 0 |
| 10 | 0 |

How would I go about parsing through the tags in order to add the State column values to the dataset?

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [August 8, 2022, 8:09pm UTC](https://forum.inductiveautomation.com/t/add-column-and-rows-to-dataset-from-tag/62797/2 "2022-08-08T20:09:37Z")

</div>

The answer to this question, (modify the value in a script transform) has been given in this thread:

> [@Append Parameter to Instance](https://forum.inductiveautomation.com/t/append-parameter-to-instance/62780):
>
> I am using a Flex Repeater and a Query binding on the instances PROP of that flex repeater in order to populate it using the following query: select job\_number as JobNumber from jobs JobNumber is the name of a parameter in the template I am using in the flex repeater. However, I have another parameter on my template that I need to pass but it is only available on a tag, a State value. Each Job has a tag with the State value I am looking to grab. How can I append that tag or State value to the …

Double posting is against forum policy.
