Hi everyone,
I'm really struggling to build this flow and could use some advice.
I have a Sharepoint list that shows sales territories & the assigned rep. The Sale rep column is setup as a Person/Group object, and there can sometimes be multiple sales reps assigned to a single territory.
Sharepoint List Setup
Sales Territory | Sales Rep |
UK | Rep 1; Rep 2; Rep 3 |
Germany | Rep 4 |
Canada | Rep 5 |
What I would ideally like to do, is to create a flow that spits out a CSV file each time a change is made to the list, but the CSV file must be delimited to show 1 rep per row with a repeated sales territory name.
Example Output
Sales Territory | Sales Rep |
UK | Rep 1 |
UK | Rep 2 |
UK | Rep 3 |
Germany | Rep 4 |
Canada | Rep 5 |
I have a flow built already to look for modifications and pull the display name from the person/group object, but the output is that it shows reps 1, 2 & 3 on a single row.
Any help would be greatly appreciated!
Solved! Go to Solution.
Here is one solution that doesn't use any expressions:
Based on this sample SharePoint List:
(1) Get Items action and initialize an array variable:
(2) Loop through each Territory, then loop through each Sales Rep:
Create a CSV table and save to OneDrive
This is the output:
Hope this helps.
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
Here is one solution that doesn't use any expressions:
Based on this sample SharePoint List:
(1) Get Items action and initialize an array variable:
(2) Loop through each Territory, then loop through each Sales Rep:
Create a CSV table and save to OneDrive
This is the output:
Hope this helps.
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
This would be my choice too, very nicely explained!! Lovely.
I have a similar problem but I want to reverse the grouping. I mean; imagine in the original table there is a rep who is listed in various territories, as well as multiple reps in certain territories. I would like to make a table with the territories covered by every individual rep, with possibly multiple territories for some of them.
I made it with several nested loops and conditions, but I feel that there is a much more elegant way to do it. Can you suggest a way?
If you can post some sample data and an example of the output you are expecting that will help. What is the expected ize of your data set (eg. <1000 rows?).
Manipulating the data in Excel or using Power BI may be the better options for the end consumer of the data?
Ellis
Ellis! thank you, this is exactly what I needed.
Thanks
I have a similar query but based on the territory filed I want to create separate spreadsheet for each. Is it possible?
Hi @Indrajit_paun ,
It will be best it you create a new forum post for your problems/issue. Please clearly explain the issue, along with any screenshots of the flow you are working on, and please sample data if possible. That way should you get a response to your specific issue from Community members.
Kind regards,
Ellis
Thanks. Yes I have already posted. Create multiple csv from a single csv on sharepoin... - Power Platform Community (microsoft.com)
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
66 | |
23 | |
16 | |
16 | |
11 |
User | Count |
---|---|
121 | |
36 | |
32 | |
28 | |
26 |