cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cweaver
Advocate II
Advocate II

Distinct Comma Separated String from SharePoint List

Hello,

I'm looking for a variation on this post, but not really sure where to start. What I am trying to do is generate a comma-separated string of distinct SharePoint values for PowerApps to pull in as the Text property of a text label. Our company has a SharePoint site of all US cities and towns set up so that each city (row) has the following: (see screenshots below)

  • Unique alphanumeric City ID
  • City name
  • State (abbreviated)
  • County
  • "Sales"
  • Region

Example of MO has more than 1 Sales number.Example of MO has more than 1 Sales number.Example of L45Z193 has more than 1 stateExample of L45Z193 has more than 1 state

Each state might have more than 1 Sales number, and each Sales number might have more than 1 state; the worst case scenario is 1 Sales number has 4 states. When a user selects a Sales number (See L-45 Z-193 above) in my PowerApp, the list I'm looking to have display would be something like:

Delaware:

Kent, Sussex, etc... for all distinct counties

 

DC:

District of Columbia, Imaginary DC County 2, Imaginary DC County 3, etc... for all distinct counties

 

MD:

County1, County2, County3, etc... for all distinct counties

I'm not really sure what kind of flow output would generate the comma-separated list best, and I'm very green when it comes to creating flows. How can I go about doing this?

1 ACCEPTED SOLUTION

Accepted Solutions
abm
Super User III
Super User III

Hi @cweaver 

 

Thanks for the screen share. Here you are dealing with large datasets and hit the timeout period of two minutes 'Respond to PowerApps' function and cannot be set or altered. 

 

Check @RezaDorrani 's YouTube channel & subscribe it please. Here Reza explains who to deal delegation and handle large datasets. 

 

https://www.youtube.com/watch?v=gwiErbYtRdA

 

Thanks

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

5 REPLIES 5
abm
Super User III
Super User III

Hi @cweaver 

 

Declare an array variable called county. Next you need to filter the sales column against your parameter. This will return all the matched records. Construct a loop to iterate each county values. Add an IF condition under the loop with a contains condition. If not contains then append the array with county value. Finally you have a distinct values of county. 

 

If you need an example I could construct one for you. Please let me know.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

Hi @abm ,

Thanks for the swift reply! What type of output would work best with needing to pull the results into PowerApps? Do you envision this flow creating a new SharePoint list, CSV file, or some other type of file? If you could show me a very basic example, that would be most helpful.

abm
Super User III
Super User III

Hi @cweaver 

 

It will be easier for me to do via screen share? I won't be available for next hour. I could do my time 9pm (UK Time). If you ok to do via screen share then please let me know and send me a private message. If not I need to build a sample flow for you which will take more time.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials
abm
Super User III
Super User III

Hi @cweaver 

 

Thanks for the screen share. Here you are dealing with large datasets and hit the timeout period of two minutes 'Respond to PowerApps' function and cannot be set or altered. 

 

Check @RezaDorrani 's YouTube channel & subscribe it please. Here Reza explains who to deal delegation and handle large datasets. 

 

https://www.youtube.com/watch?v=gwiErbYtRdA

 

Thanks

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

@abm,

Thank you tremendously for your time, assistance, and insight into PowerAutomate and how all of this works. I've got a lot to learn in this area and I'm actually excited about it; lots of cool and powerful things can be done when one takes the time to learn how to do them!

Cheers!

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (1,506)