cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JR-BejeweledOne
Super User
Super User

ClearCollect with Distinct and Concat

I need to create a collection from another collection that has 3 columns, Approver, Approver Email and Employees.

 

Approver and Approver Email need to be distinct (1 instance of Approver along with their email address) and employees needs to be a concatted column of all the employee display names that belong to the manager.

 

I am not quite sure how to build the ClearCollect statement to accomplish this.

 

I have this much

 

ClearCollect(Managers, Distinct(RequestInnput, Approver))

 

Where do I go from here or is this even possible?



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
1 ACCEPTED SOLUTION

Accepted Solutions
gabibalaban
Super User
Super User

Hi @JR-BejeweledOne ,

Try:

 

ClearCollect( 
         Managers,
         DropColumns(
               AddColumns(
                   GroupBy(RequestInput,"Approver","Approver Email","Result"),
                   "Employees",
                   Concat(Result,Employees&";")
               ),
               "Result"
)

 

 

Hope it helps !

View solution in original post

1 REPLY 1
gabibalaban
Super User
Super User

Hi @JR-BejeweledOne ,

Try:

 

ClearCollect( 
         Managers,
         DropColumns(
               AddColumns(
                   GroupBy(RequestInput,"Approver","Approver Email","Result"),
                   "Employees",
                   Concat(Result,Employees&";")
               ),
               "Result"
)

 

 

Hope it helps !

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,615)