Please help with using prompt to store variable to read specific lines on CSV

Hi! I am very new to UIVision, coming from iMacros. In iMacros, we were able to prompt which line for the program to read using the below code.

PROMPT “On which line is the data?” !VAR1

How would I do this in UIVision? I have tried using the below, but receive an error.

“Command”: “prompt”,
“Target”: ""On which line is the Data?" ",
“Value”: “var_1”,
“Description”: “”
“Command”: “store”,
“Target”: “var_1”,
“Value”: “!csvReadLineNumber”,
“Description”: “”

This is being used for applications, where each line has data for different applicants. I do not want to use a loop because I need it to stop after each application. Thank you for your help!

I haven’t used imacros for many years but I remember that the SET !DATASOURCE_COLUMNS command specifies the number of columns of which the csv is composed and in ui vision it is not necessary to specify the number of columns of the csv (ui vision detected automatically the number of columns in the csv)

If you want to save the data in a specific column of the csv you can save empty data in the columns that you are not interested in and save the data in the column that interests you.

Warning: in ui vision all the lines of the csv must have the same number of columns so remember that each line of the csv must have the same number of elements otherwise it reports an error while in imacros it was possible to use csv with different numbers of elements for each line of the csv

Thank you! So I am not as concerned with the amount of columns, but more being able to specify which row the data is being pulled from. This is being used for applications where every line is a different individual. I am needing a way to use a prompt to only pull data from line 3, for example, to complete one application and then the next application it will prompt which line and I can tell it to use line 4.

To change the csv line to use you must store the value of csv row before use the value

This read 4 line of csv

      "Command": "store",
      "Target": "4",
      "Value": "!csvReadLineNumber",
      "Description": ""

After you can use ${!COL1} or ${!COL2} to use the data of 4 csv line

1 Like