why does my workflow when extracting data from a spreasheet only populate the feilds with the first set of dat from the csv?


Badge +3

I developed a workflow to extract the field data from a csv file in SharePoint and use it to update a list, based on Vadim Tabakmans example and expanded it from there, just adding some additional fields, the variables and the associated collection operations, that I required.


However, mine populates all the fields in the list with the first fields data from the csv, rather than working as his does.

I’ve attached  the sample csv, the workflow, the template for the list and also screen shot of what it looks like when it’s run
Has anyone encountered this before?


3 replies

Userlevel 6
Badge +12

Hi Julian,

I don't think you've inialised your index variables for the elements of the CSV file. e.g. SAP Project Number is the first column (index value 0), Project Name is the second (index value 1), Project Manager is the third (index value 2).

I looked and your index variables are all set with the default value of 0 instead of the column index.

As they are all set to 0 (zero), they will all retrieve the first collection entry which is going to be your first column from the CSV file.

If you go and adjust those index variables to their corresponding column index then you should be good to go.  Just remember it starts counting at 0 instead of 1 so the index is actually the CSV column number minus 1.

Cheers,

Chris

PS also check out your index for Project Name.  I didn't open up all the actions but I think you need to use a different variable for the index here (and possibly elsewhere).

Badge +3

Many thanks Chris, for your help as ever.

I owe you a beer or three...

Userlevel 6
Badge +12

Any time Julian - especially if beer is involved! wink.png

Reply