Please, I need guidance on how to get the data in specific columns (say columns 5, 12 and 18) in a csv file. I get the error message "Error operating on collection variable. Index property is greater than the number of items in the collection." with my current workflow. All my collection operations reference the same collection variable.
My workflow is designed as follows:
- a web request that reads a csv file and stores the data in a text variable (txtA)
- a regular expression action that splits txtA (using \r\n) and stores the result in a collection variable (colA)
- a For Each action that loops through colA and stores the result in a text variable (txtB)
- a regular expression that splits txtB (using ,) and stores the result in a collection variable (colB)
- 3 collection operation actions that use a Get action on colB and stores the result in 3 text variables (txtC, txtD and txtE), using index variables that I created with the default values referencing the number of the required columns.
I will appreciate any help I can get to resolve this issue.
I don't have the time to take a deep dive into this, but maybe this can help you analyse your workflow. Usually when I work with these kind of solutions, after each action, I log the outcome (variable) to the history list (and-/or an email that stores the result). That enables me to stay on top of each step, have a closer look at the actual data and check if the actions I preform are correct.
Let me know if you need more help!