Hello,
I have to save data from a form since a macro, and re-use this data into another macro.
So I use the csvSave command from ui.vision, and csvRead too.
But, the csvSave command can just add some data one after the other, one per line, each time I launch the macro.
Or I wish to save just one data, into the first line only. I have seen that it is not possible to clear the data into the csv file with ui.vision, and I don’t know how to delete the file with ui.vision (or with javascript) once I don’t need it.
I create the file with a specific name because I have to re-use it into another macro after that.
So, if it is not possible to clear data or delete file before update or create it, or if it is not possible to update or overwrite the first value, how can I get the last value from my csv file ?
For example, my csv file is like this (on line 1 and col A) :
1234
4353
4577
4768
4834
→ I want to get the last value “4834” only.
My ui.vision code for now :
{
“Command”: “storeValue”,
“Target”: “id=numeroSinistre”,
“Value”: “!csvLine”
},
{
“Command”: “csvSave”,
“Target”: “saveClaim.csv”,
“Value”: “”
},
{
“Command”: “csvReadArray”,
“Target”: “saveClaim.csv”,
“Value”: “myCSV”
},
{
“Command”: “echo”,
“Target”: “${myCSV[6][0]}”,
“Value”: “”
}
Thanks in advanced