Using a CSV Array text to use in a IFv2 .includes

I am running an RPA script which loops through a CSV Arr. It uses ui.vision to process a series of variables and outcomes for each line

For one of the passes it stores a result from the browser window, then if the data in the $Results .includes the data in CSV array it then it follows the if, elseif and else routine.

It works fine for a single variable
{
“Command”: “store”,
“Target”: “${arr[${i}][9]}”,
“Value”: “Terminology”,
“Description”: “”
},
{
“Command”: “if_v2”,
“Target”: “${Result}.includes(”$Terminology")",
“Value”: “”,
“Description”: “”
},

My issue is some the the CSV arrays needs to contain multiple .includes

I have tried having the csv arr value
${arr[${i}][9]} = ${Result}.includes(“A”) || ${Result}.includes(“B”) || ${Result}.includes(“C”)

then
{
“Command”: “if_v2”,
“Target”: “${arr[${i}][(]}”,
“Value”: “”,
“Description”: “”
},
But this doesnt work, ui.vision runs but is not checking the $Results correctly and passes everything through the if,elseif, else.

Any ideas how I could including multiple includes without giving each one a separate value (one of the variables has 10 .includes others just have one)

Why do not use simple COLX to menage csv data ?

It’s more simple and fast.

https://ui.vision/rpa/docs/selenium-ide/csvread

The array works just like the COL so calling the cell directly rather than using an array wouldn’t fix the issue unfortunately.

COL is more simple to do because start from 1 and have automatic loop, in few seconds you can create macro with loop

csvarray start from 0 (for row and column) and it’s more complex

This job is very simple (5 minutes to write macro code with automatic loop) using COL

In your code seems there are more errors

${Result}.includes**(”$Terminology")**

${arr[${i}][(]}

Seems a total bad code, rewrite it using docs
https://ui.vision/rpa/docs

My loop macro works perfectly using arr or col, whether I use arr or a direct cell address is not the problem. the issue is how can I use multiple .includes conditions from a CSV cell.

Ui vision support javascript, this is not a ui vision question but it’s a javascript question

Here the solution