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!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Users online (1,084)