Hello everyone,
I am trying to create a workflow that brings items from a CSV file located in SP to a list located in the same SP.
The Condition: length(body('Filter_array'))
What am I missing?
Your assistance is kindly appreciated.
Cheers,
The title column is unique.
Okay, then my previous response doesn't apply at all - CSVs are totally different beasts.
Do you have a unique value that is held in your XLSX, that there should be only one of? A Title? An email (ie, if there's only one line per person) or an ID (if there's a commodity code or something)?
If so, you will use that as your filter - the bottom paragraph of my post outlines the steps, give it a shot if you have unique data. If you don't, you will need to create it. (Common ways is to combine acronyms to create a unique ID. Row # won't be a unique ID in this scenario.)
it is a xlsx, you are correct.
Hi there,
I'm a little confused. The Excel action - Get Rows Present in a Table - doesn't work for CSVs. I just tested it to make sure I'm not forgetting something - and, it sure doesn't work for me.
Are you sure this is a CSV? Or is this just a normal Excel file? I just want to get clarification before we move forward, because if you're doing something different, different instructions may be needed.
Hi,
I tried it but now the workflow wont add new items from the CSV file. this is what I currently have:
Duplicates in the CSV file itself, or duplicates as in, if it already exists in the SharePoint list?
Anyway, to get the data out of the CSV, you should look at something like this:
https://www.youtube.com/watch?v=pmQkeFeSkiw
Basically using the "Get File Content" action to aim at the CSV, get that content, and then use split() on new lines to split after every carriage. Then, your commas tell you where the limits are between each columns content.
The video is very well done, it will get you what you need.
As for the duplications, if you want to prevent duplicates going into SharePoint (usually people will want to "Create" if it doesn't exist there, and "Update" the existing one if it does.) You will just use a "Get Items" action and Filter to the unique column for that one - like, Title, for example. You can use a condition based on length() -- if you aim the length() expression at the output from your Get Items, it will come back with 0 if empty (ie, nothing was found) and 1 if it found an item. If 0, Create Item. If Greater Than 0, Update Item -- and you can use the "ID" dynamic content that came back with the Get Items action.
I need to exclude any duplicates.
Tomac
986
Moderator
stampcoin
699
Super User 2025 Season 2
Riyaz_riz11
577
Super User 2025 Season 2