cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
alessandramaced
Helper IV
Helper IV

CONCAT PEOPLE WITH SAME ID

Hi

 

I have a sharepoint list called cadEquipe with 2 columns - "Name";"ProjectID".

 

Name                         ProjectID

Rosa                             567

Alessandra                   567

 

There are multiple people for the same projectID.

Need to create a collection into powerapps with 2 columns - "Names" and "ProjectID"

The columns "Names" should concat all people with same ProjectID separated with commas.

 

Names                          ProjectID

Rosa;Alessandra           567

 

 

Is that possible? Tried ForAll but didn´t realized the right way. The Name columns is a people column in sharepoint.

I want to concat by DisplayName.

Thank you..

1 ACCEPTED SOLUTION

Accepted Solutions

Chances are good my example code did not have your columns named properly - I am making some guesses/assumptions. Can you post the error and any output that is generated?

View solution in original post

8 REPLIES 8
BCLS776
Community Champion
Community Champion

You don't have to use a ForAll to do this: The Concat() function will take a column (or an entire table) and put all the items together.

 

The syntax will depend on if you are using a People type column or not, but something along the lines of:

Concat(Name.DisplayName, DisplayName, ",")
// Name.DisplayName is a column derived from a People column in Sharepoint

But I don't want to take entire table together. I want to group people with same ID.

OK, to group and pull out the display names, again on a multi-person Sharepoint column, try:

 

ClearCollect(colGrouped,
    AddColumns(
        GroupBy(cadEquipe,"ProjectID","Project_Group"),
        "PeopleNames",
        Concat(Project_Group.Name,
            Concat(Name.DisplayName, DisplayName,","),
            ","
        )
    )
);

This should pull out all names associated with each ProjectID and put them in a column with each ProjectID grouping.

Didn't work, I don't now why

Chances are good my example code did not have your columns named properly - I am making some guesses/assumptions. Can you post the error and any output that is generated?

View solution in original post

alessandramaced_1-1627412290080.png

error: invalid use of "." In portuguese instead of comma we use semicolon.

Tried these too:

alessandramaced_4-1627413093258.png

 

 

 

returns: 

 

alessandramaced_3-1627413066829.png

 

alessandramaced
Helper IV
Helper IV

Wow

Works like a charm now. 

 

formula

 

alessandramaced_0-1627414748202.png

 

thank you very much

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

Users online (1,090)