CSV Checking value in a specific row and skip it

Hello, I want to make a macro where it checks for a value in a specific row in every column then skip the column if it has already a value in that row?

For example:
John,john@gmail.com,used
Mary,mary@gmail.com,used
Michael,michael@gmail.com,

The script would check if it has a “used” value on row three then skip it then use the Michael,michael@gmail.com since it has no “used” on row three.

I know about If statements, I just want to know about those csv commands.

Any help would be appreciated!

Yes you can you can use a similar code like, if in the column there is NOT used macro use it

Thank you, I haven’t tried them yet but

As I read it’s {!COL1} how will it goes to col2 if col1 value does exist? should I use if_v2 manually each time?

In normal programming terms we use terms like “++” for increment

For example if “used” does exist in (column 3 row 3 ) then copy the (column 3 row 1 and row 2) then add used in row 3 to indicate it’s used

Sorry my explanation was vague I’m pretty tired, Let me know if you can’t understand what I mean, I’ll try to explain it better later.

Solved!

For those who struggled with the same thing, just use csvReadArray to put on a variable then it would look like this: ${Variable}[col][row] so in order to add col everytime it doesn’t exist and add increment via execute script and make it trigger everytime when the value doesn’t exist

Sample Code:

{
“Name”: “v”,
“CreationDate”: “2021-8-17”,
“Commands”: [
{
“Command”: “csvReadArray”,
“Target”: “readcsvtestdata.csv”,
“Value”: “myCSV”,
“Description”: “”
},
{
“Command”: “store”,
“Target”: “0”,
“Value”: “Loop_Counter”,
“Description”: “”
},
{
“Command”: “label”,
“Target”: “Loop”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “if_v2”,
“Target”: “${myCSV[${Loop_Counter}][1]} == “Knuth””,
“Value”: “”,
“Description”: “”
},
{
“Command”: “echo”,
“Target”: “Knuth does exist”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “else”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “echo”,
“Target”: “Knuth doesn’t exist”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “executeScript_Sandbox”,
“Target”: “counter = ${Loop_Counter};\nvar add = ++counter\nreturn add;”,
“Value”: “Loop_Counter”,
“Description”: “Add one to column variable to check another column in next loop check”
},
{
“Command”: “gotoLabel”,
“Target”: “Loop”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”,
“Description”: “”
}
]
}