# Modifying a Dataset in Ignition 8

**URL:** <https://forum.inductiveautomation.com/t/modifying-a-dataset-in-ignition-8/34254>\
**Category:** Ignition\
**Created:** [April 28, 2020, 1:46am UTC](https://forum.inductiveautomation.com/t/modifying-a-dataset-in-ignition-8/34254 "2020-04-28T01:46:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![StephenBarnes](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@StephenBarnes](https://forum.inductiveautomation.com/u/StephenBarnes)\
**Post date:** [April 28, 2020, 1:46am UTC](https://forum.inductiveautomation.com/t/modifying-a-dataset-in-ignition-8/34254/1 "2020-04-28T01:46:26Z")

</div>

Hi,

I feel like this is a really easy fix however I can’t seem to get it. I have a one column dataset with 5 rows. For example: the dataset is called Signals: where the info inside of it is local, near , global, far, very far. How would I remove global without using a row id as the order may change everytime a survey is completed. I looked in the system.dataset.deleteRow but don’t know how to get around not using a row Index. Can I bind the string global to a row index and if so how can I do that?

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [April 28, 2020, 1:53am UTC](https://forum.inductiveautomation.com/t/modifying-a-dataset-in-ignition-8/34254/2 "2020-04-28T01:53:27Z")

</div>

You just perform a for loop to check row by row and if the value to that row belongs to “global” you ignore that value

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [April 28, 2020, 10:59am UTC](https://forum.inductiveautomation.com/t/modifying-a-dataset-in-ignition-8/34254/3 "2020-04-28T10:59:01Z")

</div>

If there’s only one column, how do you know (programmatically) which one will be the global one? You have to know that first, then use @jespinmartin1’s method. Be sure to not try to modify in place. The pruned dataset should go in a separate target property/tag.

---

<div class="post-metadata">

**Author:** ![StephenBarnes](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@StephenBarnes](https://forum.inductiveautomation.com/u/StephenBarnes)\
**Post date:** [April 28, 2020, 12:03pm UTC](https://forum.inductiveautomation.com/t/modifying-a-dataset-in-ignition-8/34254/4 "2020-04-28T12:03:00Z")

</div>

How would I be able to have the for loop check for global and ignore the value? Would the script just append a new dataset without the global? I would like to do so however I’m not sure what the script would be to be able to cycle through a for loop and ignore just the global value.

---

<div class="post-metadata">

**Author:** ![StephenBarnes](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@StephenBarnes](https://forum.inductiveautomation.com/u/StephenBarnes)\
**Post date:** [April 28, 2020, 12:04pm UTC](https://forum.inductiveautomation.com/t/modifying-a-dataset-in-ignition-8/34254/5 "2020-04-28T12:04:33Z")

</div>

The global one has the string value global so it would be one column where my column header would be signals. All my values within the signals are strings and I want to just remove the row with the string global.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [April 28, 2020, 12:48pm UTC](https://forum.inductiveautomation.com/t/modifying-a-dataset-in-ignition-8/34254/6 "2020-04-28T12:48:18Z")

</div>

The attached window provides three methods for handling the dataset in the way you describe.

[filter\_global\_string\_2020-04-28\_0845.zip](https://us1.discourse-cdn.com/inductiveautomation/original/2X/a/a3918ec58a958ed125f047c2b87f504ad36b779b.zip) (7.9 KB)

 ![2020-04-28_8-47-21](https://us1.discourse-cdn.com/inductiveautomation/original/2X/0/066e3c8920c22b8a9476f0abe9d09eee585ecd5c.png)

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [April 28, 2020, 8:54pm UTC](https://forum.inductiveautomation.com/t/modifying-a-dataset-in-ignition-8/34254/7 "2020-04-28T20:54:19Z")

</div>

You can ignore it with a if statement inside the for loop. The script can do as much you want to do. You could overwrite your current dataset or create a new one.  
@JordanCClark did the job, but do you still new help?
