web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Create collection with...
Power Apps
Answered

Create collection with merged choice values column

(0) ShareShare
ReportReport
Posted on by 109

I have a SharePoint list with an ID and Principals column. Principals is a Choices column.

 

Is it possible to create a collection, delimiting the choices values with a comma. So my output collection would be something like :

 

IDPrincipals
1Apple
2Orange, Pear
3Apple, Orange
4Pear
5Apple, Pear

 

Categories:
I have the same question (0)
  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Like this:

     

    Nogueira1306_0-1650447713271.png

     

     

    Collect(
    CollectionNew,
    {
    Text: Concat(ComboBox8.SelectedItems,ThisRecord.Item & ",")
    }
    )

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,

    Gonçalo Nogueira

    Check my LinkedIn!

    Buy me a coffee!

    Check my User Group (pt-PT)!

    Last Post on Community

    My website!

  • bd528 Profile Picture
    109 on at

    @Nogueira1306 Thanks for the reply.

     

    The output is what I require, but how do I adjust the code so there is no requirement for a combobox? I want every record from list lstPrincipals to be merged.

     

    Is that possible?

     

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Collect(
    CollectionNew,
    {
    Text: Concat(lstPrincipals, Text)
    }
    )

     

    Like that, maybe?

     

    If you need additional help please tag me in your reply and please like my reply.
    If my reply provided you with a solution, pleased mark it as a solution ✔️!

    Best regards,

    Gonçalo Nogueira

    Check my LinkedIn!

    Buy me a coffee!

    Check my User Group (pt-PT)!

    Last Post on Community

    My website!

  • bd528 Profile Picture
    109 on at

    @Nogueira1306 

     

    I get an "invalid argument type record expecting a text value instead" error with that - on the assumption I should be replacing 

     

    Text: Concat(lstPrincipals, Text)

     

    with

     

    Text: Concat(lstPrincipals, Principals)

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Yes, you need to change to your field names... The names I wrote might be wrong.

  • bd528 Profile Picture
    109 on at

    @Nogueira1306 

     

    In that case, I'm still getting the "invalid argument type record expecting a text value instead" error.

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Which type of field is "Principals"?

  • bd528 Profile Picture
    109 on at

    @Nogueira1306 

     

    Its a Choice column

  • Nogueira1306 Profile Picture
    7,390 Super User 2024 Season 1 on at

    Text: Concat(lstPrincipals, Principals.Value)

     

    You need to insert the ".Value" after the field.

  • bd528 Profile Picture
    109 on at

    @Nogueira1306 

     

    I'm getting a "invalid argument type table expecting a text value instead" error with that.

     

    Perhaps what I want to do isn't possible?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

#2
11manish Profile Picture

11manish 193

#3
Valantis Profile Picture

Valantis 138

Last 30 days Overall leaderboard