!csvReadLineNumber keeps reading line 1

Hi!

I’m trying to add a manual loop inside my code so I can have a standalone loop inside my macro.

Issue: It keeps picking up the first line on CSV no matter what the value in the variables tab for !csvReadLineNumber

Hope someone can help!

{
“Name”: “HELLO”,
“CreationDate”: “2020-4-13”,
“Commands”: [
{
“Command”: “store”,
“Target”: “medium”,
“Value”: “!replayspeed”
},
{
“Command”: “csvRead”,
“Target”: “HELLO.csv”,
“Value”: “”
},
{
“Command”: “store”,
“Target”: “3”,
“Value”: “maxRowToRead”
},
{
“Command”: “while_v2”,
“Target”: “{!loop} <= {maxRowToRead}”,
“Value”: “”
},
insert other commands here

Variables:
image

Kantu: Latest
Browser: Chrome
OS: Mac/Catalina

In your macro snippet that first does csPreformatted textvRead, and then you check !csvreadlinenumber. But since it is after the csvRead, it is 2 - as expected. Every csvRead increases !csvreadlinenumber +1

Thank you for your reply @Plankton! Are you saying that I should put the csvRead inside the while loop?

Yes!

Or use the new csvReadArray command to get all data into any array at once. Then you can simply get the data from the array.

Thank you, @Plankton. Will give these a try and will let you know!