Form Filler, File Upload, Needing help with Iteration of the csv. Included Reward/Gift for your help

So I’m trying to automate the form field data entry for https://www2.mediabase.com/mbapp/NewMusicNotification

and automate / iterate through a csv. This csv (have to keep private) contains all the data needed for this form and my attached example is very close to working. It’s task is to find the song on my HDD and upload with the registration data of the song. I followed the file upload tutorial but couldn’t get iteration to work with a csv. I’ve got it going through the first data entry (which is the last row added in the csv) but not iterating to the next data entry. (row) Is it because it’s starting at the bottom of the csv and doesn’t know how to iterate?

To the person that helps me with this, I’ll send you a six pack, a video game code on steam and some signed albums. I have over 260 songs, and I know other musicians/djs/creators which have large collections that could benefit from this macro. I’d be putting together a github to share all my music form submission / registration macros…
{
“Name”: “MediabasePlusFileUpload”,
“CreationDate”: “2022-1-22”,
“Commands”: [
{
“Command”: “csvReadArray”,
“Target”: “djbigdadtomediabaseresponse_5-1-2022.csv”,
“Value”: “arr”,
“Description”: “”
},
{
“Command”: “executeScript_Sandbox”,
“Target”: “return ${arr[0]}.length;”,
“Value”: “col”,
“Description”: “”
},
{
“Command”: “echo”,
“Target”: “Number of Rows = ${!csvReadMaxRow}”,
“Value”: “green”,
“Description”: “”
},
{
“Command”: “echo”,
“Target”: “Number of Columns = ${col}”,
“Value”: “pink”,
“Description”: “”
},
{
“Command”: “echo”,
“Target”: ““Status = ${!csvReadStatus}, line = ${!csvReadLineNumber}””,
“Value”: “”,
“Description”: “”
},
{
“Command”: “times”,
“Target”: “${!csvReadMaxRow}”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “open”,
“Target”: “Mediabase - New Music Notification”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “executeScript_Sandbox”,
“Target”: “return ${!times} - 1;”,
“Value”: “i”,
“Description”: “”
},
{
“Command”: “echo”,
“Target”: “Current CSV Row: col1=${arr[${i}][0]}, col2=${arr[${i}][1]}, col3=${arr[${i}][2]}”,
“Value”: “brown”,
“Description”: “”
},
{
“Command”: “if_v2”,
“Target”: “${arr[${i}][2]} == “done””,
“Value”: “”,
“Description”: “”
},
{
“Command”: “echo”,
“Target”: “Row ${!times} is already done, skipping it.”,
“Value”: “green”,
“Description”: “”
},
{
“Command”: “else”,
“Target”: “${arr[${i}][2]} == “done””,
“Value”: “”,
“Description”: “”
},
{
“Command”: “echo”,
“Target”: “Row ${!times} – Form filling etc would be here”,
“Value”: “blue”,
“Description”: “”
},
{
“Command”: “store”,
“Target”: “${!csvReadMaxRow}”,
“Value”: “!csvReadLineNumber”,
“Description”: “”
},
{
“Command”: “echo”,
“Target”: “${!csvReadStatus} == \“OK\””,
“Value”: “”,
“Description”: “”
},
{
“Command”: “csvRead”,
“Target”: “djbigdadtomediabaseresponse_5-1-2022.csv”,
“Value”: “arr”,
“Description”: “”
},
{
“Command”: “type”,
“Target”: “id=Name”,
“Value”: “${!COL10}”,
“Description”: “”
},
{
“Command”: “type”,
“Target”: “id=Company”,
“Value”: “${!COL5}”,
“Description”: “”
},
{
“Command”: “type”,
“Target”: “id=Phone”,
“Value”: “${!COL11}”,
“Description”: “”
},
{
“Command”: “type”,
“Target”: “id=Email”,
“Value”: “${!COL6}”,
“Description”: “”
},
{
“Command”: “type”,
“Target”: “id=ExactArtist”,
“Value”: “${!COL2}”,
“Description”: “”
},
{
“Command”: “type”,
“Target”: “id=FeaturedArtist”,
“Value”: “${!COL17}”,
“Description”: “”
},
{
“Command”: “type”,
“Target”: “id=LabelListing”,
“Value”: “${!COL9}”,
“Description”: “”
},
{
“Command”: “type”,
“Target”: “id=ExactTitle”,
“Value”: “${!COL14}”,
“Description”: “”
},
{
“Command”: “type”,
“Target”: “id=MixVersion”,
“Value”: “${!COL16}”,
“Description”: “”
},
{
“Command”: “type”,
“Target”: “id=OfficialReleaseDate”,
“Value”: “${!COL12}”,
“Description”: “”
},
{
“Command”: “type”,
“Target”: “id=TrackIsrc”,
“Value”: “${!COL7}”,
“Description”: “”
},
{
“Command”: “type”,
“Target”: “id=CdTitle”,
“Value”: “${!COL1}”,
“Description”: “”
},
{
“Command”: “type”,
“Target”: “id=CdUpc”,
“Value”: “${!COL15}”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “xpath=//input[@id=‘IsIndependentLabel’ and @name=‘IsIndependentLabel’ and @value=‘true’]”,
“Value”: “true”,
“Description”: “Independent?”
},
{
“Command”: “click”,
“Target”: “id=IsChristmasOrHanukah”,
“Value”: “false”,
“Description”: “Christmas/Hanukah Music?”
},
{
“Command”: “click”,
“Target”: “id=HasCanadianContent”,
“Value”: “false”,
“Description”: “”
},
{
“Command”: “type”,
“Target”: “id=ArtistWebUrl”,
“Value”: “${!COL4}”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “id=AudioFile”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “type”,
“Target”: “id=AudioFile”,
“Value”: “${!COL13}”,
“Description”: “File Upload by Path”
},
{
“Command”: “comment”,
“Target”: “XType // ${KEY_ESC}”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “XClick”,
“Target”: “submit_dpi_168.png”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “echo”,
“Target”: “Number of tracks registered: ${!times}”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “comment”,
“Target”: “Change last column to DONE <== HERE IS WHERE THE MAGIC HAPPENS”,
“Value”: “arr”,
“Description”: “”
},
{
“Command”: “executeScript_Sandbox”,
“Target”: "var b = ${arr}; b[${i}][2] = “done”; return b; ",
“Value”: “arr”,
“Description”: “”
},
{
“Command”: “comment”,
“Target”: “Save array after each loop, use same CSV name”,
“Value”: “arr”,
“Description”: “”
},
{
“Command”: “csvSaveArray”,
“Target”: “djbigdadtomediabaseresponse_5-1-2022.csv”,
“Value”: “arr”,
“Description”: “”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”,
“Description”: “”
}
]
}

If nobody here has time, you can for sure find help for low $$ at freelancer.com or Upwork. Just make sure you get the automation done in UI.Vision, and not something else.

See here: Hiring - Desktop Automation - #2 by Plankton

Ok so this is where I’m having trouble. Saving done on the correct row. Furthermore, As it loops through my csv, its not iterating to the next row. It continues with the last entry in the CSV. Would love some help manipulating my macro, I’m so close to cracking it, i just know it. I’ve got it writing “done” to my csv but its writing it at the top of the csv instead of the actual entry that was written/submitted which is at the bottom of the csv. Apologize about the bloat, I’ve been trying to debug for weeks on this.
I’m trying to use ${!times} in the row section - I’m wondering where I’m starting form automation (line 17) if I need to use the csvRead or csvReadArray = If I use csvRead I can call columns dynamic, that great now how do I tell it to look at a specific row as it iterates?
Running csvReadArray would just render my code/scripts below into the text box…

I’d like to be able to write something like ${myCSV[row][column]}
mine would look like:
${arr[$!times][$!COL10]} or
${arr[!times][!COL10]}

I really appreciate the help here. I’m barely qualified to be writing JS or any scripts for that matter. I’m more of a trial and error, problem solver. I have over 260 entries to complete and I’m exhausted. I just wish someone could help me in this time of need.

THANK YOU SO MUCH FOR YOUR HELP!

{
  "Name": "MediabasePlusFileUpload",
  "CreationDate": "2022-1-26",
  "Commands": [
    {
      "Command": "csvReadArray",
      "Target": "djbigdadtomediabaseresponse_5-1-2022.csv",
      "Value": "arr",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "Number of Rows = ${!csvReadMaxRow}",
      "Value": "green",
      "Description": ""
    },
    {
      "Command": "executeScript_Sandbox",
      "Target": "return ${arr[0]}.length;",
      "Value": "col",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "Number of Columns = ${col}",
      "Value": "pink",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "\"Status = ${!csvReadStatus}, line = ${!csvReadLineNumber}\"",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "times",
      "Target": "${!csvReadMaxRow}",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "open",
      "Target": "https://www2.mediabase.com/mbapp/NewMusicNotification",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "executeScript_Sandbox",
      "Target": "return ${!times} - 1;",
      "Value": "i",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "inner loop=${!times}",
      "Value": "i",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "Current CSV Row: col1=${arr[${i}][0]}, col2=${arr[${i}][1]}, col3=${arr[${i}][2]}",
      "Value": "brown",
      "Description": ""
    },
    {
      "Command": "if_v2",
      "Target": "${arr[${i}][2]} == \"done\"",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "Row ${!times} is already done, skipping it.",
      "Value": "green",
      "Description": ""
    },
    {
      "Command": "else",
      "Target": "${arr[${i}][2]} != \"done\"",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "Row ${!times} -- Form filling etc would be here",
      "Value": "blue",
      "Description": ""
    },
    {
      "Command": "store",
      "Target": "${!csvReadMaxRow}",
      "Value": "!csvReadLineNumber",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "${!csvReadStatus} == \\\"OK\\\"",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "csvRead",
      "Target": "djbigdadtomediabaseresponse_5-1-2022.csv",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "id=Name",
      "Value": "${!COL10}",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "id=Company",
      "Value": "${!COL5}",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "id=Phone",
      "Value": "${!COL11}",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "id=Email",
      "Value": "${!COL6}",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "id=ExactArtist",
      "Value": "${!COL2}",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "id=FeaturedArtist",
      "Value": "${!COL17}",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "id=LabelListing",
      "Value": "${!COL9}",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "id=ExactTitle",
      "Value": "${!COL14}",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "id=MixVersion",
      "Value": "${!COL16}",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "id=OfficialReleaseDate",
      "Value": "${!COL12}",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "id=TrackIsrc",
      "Value": "${!COL7}",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "id=CdTitle",
      "Value": "${!COL1}",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "id=CdUpc",
      "Value": "${!COL15}",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=//input[@id='IsIndependentLabel' and @name='IsIndependentLabel' and @value='true']",
      "Value": "true",
      "Description": "Independent?"
    },
    {
      "Command": "click",
      "Target": "id=IsChristmasOrHanukah",
      "Value": "false",
      "Description": "Christmas/Hanukah Music?"
    },
    {
      "Command": "click",
      "Target": "id=HasCanadianContent",
      "Value": "false",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "id=ArtistWebUrl",
      "Value": "${!COL4}",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "id=AudioFile",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "id=AudioFile",
      "Value": "${!COL13}",
      "Description": "File Upload by Path"
    },
    {
      "Command": "click",
      "Target": "xpath=//*[@id=\"app-frm-new-music-notification\"]/div/div[2]/div/button",
      "Value": "",
      "Targets": [
        "xpath=//*[@id=\"app-frm-new-music-notification\"]/div/div[2]/div/button",
        "xpath=//button[@value='Submit']",
        "xpath=//div[2]/div/button",
        "css=#app-frm-new-music-notification > div > div.row > div > button"
      ],
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "Number of tracks registered: ${!times}",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "comment",
      "Target": "Change 3rd column to \"done\" <== HERE IS WHERE THE MAGIC HAPPENS",
      "Value": "arr",
      "Description": ""
    },
    {
      "Command": "executeScript_Sandbox",
      "Target": "var b = ${arr}; b[${i}][2] = \"done\"; return b; ",
      "Value": "arr",
      "Description": ""
    },
    {
      "Command": "comment",
      "Target": "Save array after each loop, use same CSV name",
      "Value": "arr",
      "Description": ""
    },
    {
      "Command": "csvSaveArray",
      "Target": "arr",
      "Value": "djbigdadtomediabaseresponse_5-1-2022.csv",
      "Description": ""
    },
    {
      "Command": "end",
      "Target": "",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "end",
      "Target": "",
      "Value": "",
      "Description": ""
    }
  ]
}