Modifying a Dataset in Ignition 8

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?

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

1 Like

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.

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.

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.

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

filter_global_string_2020-04-28_0845.zip (7.9 KB)

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?