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 / Multi Select Dropdown,...
Power Apps
Answered

Multi Select Dropdown, Pop Ups or Cascading Dropdowns, with Concatenation

(0) ShareShare
ReportReport
Posted on by 82

I have a Multi-Select Dropdown with Group 1, Group, 2, Group 3, Group 4, etc. in my form.  The user needs to select the one or more Groups that are participating.  Currently I have about 10 Groups in the list.

 

For each group selected, they need to select the current status of that group's participation: In Review, Approved, Partially Approved, Declined.

 

Those selections should be concatenated in the Sharepoint list, so in the one "Participating Group Status" field you would see:

Group 1 - In Review

Group 3 - Approved

Group 4 - Declined 

 

Is there a way to do this in PowerApps, or do I need to forget the multi-select dropdown and set each Group up as a separate checkbox with a cooresponding status field?

 

THANKS!

Categories:
I have the same question (0)
  • EddieE Profile Picture
    4,643 Moderator on at

    @Jukie 

    You can tie a gallery to your ComboBox, then in the gallery have a status dropdown. From there, you can Patch to SharePoint. It's unclear if your column "Participating Group Status" will be for a single Group record or all selected Groups, with  their statuses need to be in one field?

     

    Something like this with a Patch might work?

    EddieE_1-1691103306379.png

     

     

  • Jukie Profile Picture
    82 on at

    Hi EddieE - that certainly seems like it might work!  However, I've never worked with a Gallery.  Any chance you could provide me with directions on how to do this?  And yes, I would like all participating Groups to be in one field in my Sharepoint List.

  • Verified answer
    EddieE Profile Picture
    4,643 Moderator on at

    @Jukie 

    Ok, this is a test end product, but you'll need to adjust the 'Save' to be your Patch function.

     

    EddieE_0-1691106772958.png

    Controls:

    1. ComboBox, your current original one. I've named mine cbGroups

    2. Lefthand gallery, I've called mine galGroup but you can call it whatever suits you. Set the Layout to Title only.

      2.1 Items property of LH gallery

    cbGroups.SelectedItems

      2.2. For the Title label select the field that will display your Group name, eg

    ThisItem.Value
    // or ThisItem.GroupName
    // use Intellisense to help you select the correct field

      2.3 With the gallery selected, Add a Dropdown with the following features. Name this dropdown ddStatus

    // Items property
    ["In Review","Approved","Partially Approved","Declined"]
    
    // AllowEmptySelection property
    true
    
    // Default property
    ""

     

    3. Add a button with this code

    ClearCollect(
     colData,
     {
     'Participating Group Status': 
     Concat(
     ForAll(galGroup.AllItems,
     {
     combinedGrps: lbGroup.Text & " - " & ddStatus.Selected.Value
     }
     ),
     combinedGrps, Char(10) // Char(10) adds a linebreak in your text
     )
     }
    )

    Note: the above code will need to be adjusted to match/meet your Patch needs, eg

    Patch(
     yourDataSource,
     Defaults(yourDataSource),
     {
     'Participating Group Status': 
     Concat(
     ForAll(galGroup.AllItems,
     {
     combinedGrps: lbGroup.Text & " - " & ddStatus.Selected.Value
     }
     ),
     combinedGrps, Char(10) // Char(10) adds a linebreak in your text
     )
     }
    )

    The above creates a NEW record, but if you need to update an existing record, it'll need to change.

     

    Using the above collection we created, add a new gallery. This is just to display the value created by the button. Set the Items of this new gallery to colData and adjust the label reference to display the text you are going to eventually Patch.

     

    Let me know if this helps, or you need a little more assistance.

  • Jukie Profile Picture
    82 on at

    @EddieE I cannot tell you how helpful this was! I am new at this so it took a bit of trial and error, but I finally got it and it works like a charm.  I haven't tried the patch yet, but that is next on the list.  Thank you so much for your help!

  • Jukie Profile Picture
    82 on at

    Hi Again - I'm afraid after I got it all set up I noticed an issue.  This form WILL be used to both create new and to regularly edit a record.  I select the items in my group.  They are added to the status gallery where I select their status.  However, if I add or remove a group for the original list, ALL the statuses are reset.  How do I fix this?  (Note that I did change my ComboBo to checkboxes - it still works fine as long as I don't change anything.)

  • EddieE Profile Picture
    4,643 Moderator on at

    @Jukie 

    Yes, I did see this as well but left it as is thinking the process your users would follow wouldn't make this an issue.

     

    To address this you can use a collection for the Items of the Lefthand gallery. For each checkbox add this code

    // Default
    // This will help address your Edit requirements
    Self.Text in colGroups.Group
    
    // OnCheck
    Collect( colGroups, {Group: Self.Text, Status: ""})
    
    // OnUncheck
    RemoveIf( colGroups, Group = Self.Text)

     

    Change the Items of the Lefthand gallery to 

    colGroups

     

    Set the OnChange of the Status dropdown in the gallery to

    UpdateIf( colGroups, Group = ThisItem.Group, {Status: ddStatus.Selected.Value})

     

    Your Save button stays the same.

     

    Extras (for testing):

    You can add a 'Cancel' icon with this code to clear checkboxes (I've just used 3 here) and the collection

    Reset(cbGrp1); Reset(cbGrp2); Reset(cbGrp3);Clear(colGroups)

    Add a 'Get Data' button with this code to see how data coming in from your datasource will behave

    ClearCollect( colGroups, {Group: "Grp2", Status: "Approved"})

     

    You may need to think about how users will use the Edit function. For example, if I click the 'Get Data' button, I can add new Groups and adjust as needed - however, if I Uncheck Group2 it's removed from the collection. This may/may not be what you want and will need to think about the process to control this behavior, if that is your requirement?

  • Jukie Profile Picture
    82 on at

    @EddieE 

    Worked like a charm! I am so close.  I've figured out a few things, but have spent hours online trying to figure out the rest.  If you are willing to hang with me ...  here is what I have.

     

    PowerApp Help.PNG

    Here is where I am still stuck:

    The form this is on will be used regularly to both add and update records in a SharePoint list.  When I click on New or Edit in SharePoint, I need the form to act accordingly.

    1.) I cannot seem to include the Group_Decisions Gallery or the Decision_Display Gallery in the form without putting them into a DataCard (I want them to flow with the form).  However when I put them a Data Card (either separate cards or the same card) the concatenation fails.  The only thing that shows up in the Decision_Display Gallery is "Group A - - ".  I don't get the ddStatus or Amount.  (Note that I don't truly need the Display Gallery in the form, just those results to show up in a field in SharePoint.)

    2.) I have a field called "Decisions" in my SharePoint list.  I need the results that land in the Display Gallery to show up there.  The patch needs to work for both editing a record and creating a new one.  I've made many attempts, but can't get any of them to work.

     

    Thanks again for all of your help!

  • EddieE Profile Picture
    4,643 Moderator on at

    @Jukie 

    Are you talking about moving things around in the app canvas to fit the galleries in? This SharePoint Integrated Form has a form and 2 galleries, ie

    EddieE_0-1691444827814.png

    You can adjust the Display Settings to fit things in, eg

     

    EddieE_1-1691444882803.png

     

    You can add galleries to Forms but I wouldn't advise it. They can behave in unexpected ways and if you are using a SharePoint Integrated form these already act weird so it's best not to stir the pot haha. However, if you are insistent on adding your gallery to the form you can do this

     

    Insert a Gallery beside your form, select the Gallery and cutting it (ctrl-x) and then selecting your datacard and pasting (ctrl-v).

     

     

     

     

     

  • Jukie Profile Picture
    82 on at

    I was having trouble having the galleries flow with the form when I scrolled, but I think I've got it sorted.  Yes - I did originally cut and paste them into DataCards, but given that it caused issues I took them back out.

     

    The issue now is the patch.  I've looked up every type of Patch I can think of with no luck.  I need the items that appear in the DecisionsDisplay Gallery ('Participating Group Status') to show up in a field in my Sharepoint list called Decisions.  I need it to do this for both new and updated records when I hit save.

  • EddieE Profile Picture
    4,643 Moderator on at

    @Jukie 

    Up until now, I've supplied a method rather than a specific process that fits your data. I need your data specifics to help build a Patch statement.

     

    With the above code, this Patch works - but will only create new records currently, not edit existing ones

     

    Patch(
     yourListname,
     ForAll(
     colData As _data,
     {
     ID: _data.ID,
     'Participating Group Status': _data.'Participating Group Status'
     }
     )
    )

     

     

    Once you share the data source, Gallery Items plus anything else that's relevant I can help you with the patch.

     

    EDIT: I'm a little tired today so that Patch code above isn't quite what I'd do. Still, send me what you have and tried and I'll have a look.

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 136 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 109 Super User 2026 Season 2

Last 30 days Overall leaderboard