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 / Multiple Select combo ...
Power Apps
Answered

Multiple Select combo box value from Gallery.

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi All,

i have a small requirement where i have a gallery and an edit form. Once i click on the edit button in the gallery it opens up the edit form. Now i have put the below code in the edit button of gallery;

 

UpdateContext({editformvisible : true});Set(editformdata,Gallery4_2.Selected);

 

well the only problem is the multiple select drop down in the edit form does not populate the values from the gallery. i have the below code in the items property of the combo box;

 

Filter(ppn,Region = DataCardValue14_1.Selected.Value).Title

 

 

The combo box basically filters its values based upon the  value selected from the upper drop down; here is a sample of the form.

 

Now i would like to populate the items in the combo box which were selected earlier by user while creating new request. 
But there is a catch, it should populate the whole list of title based upon region in combo box and also select the items which were previously selected by user while creating a new request. Hope someone can help me out in this. 

 

image.png 

Categories:
  • WarrenBelz Profile Picture
    156,774 Most Valuable Professional on at

    Hi @Anonymous ,

    I have not got my head completely around this, but it sounds like you want add two collections of data together in the Items of your combo box? If so, you need to ClearCollect the first lot (from the gallery) and then add the second ones with Collect. The field name would need to be the same and the collection would then be the Items of your Combo Box. You would also need to possibly change the Update property of the card.

    If you have go at this. happy to help with anything you get stuck on.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @WarrenBelz  that is not the case actually. i have the gallery as given below;

     

    Now when i click on the edit button , i want the items selected earlier in the combo box to appear in the combo box. However, i also want to bring in a filtered list of projects from another list based upon the region drop down selection.

     

    example ; click on edit button -> combo box to display DF786 selected for India region , also other projects listed in the combo box for India region.

     

    I hope you get it now?

     

  • WarrenBelz Profile Picture
    156,774 Most Valuable Professional on at

    @Anonymous ,

    Your picture does not show a gallery, an edit button, or the combo box with the items selected earlier, so I am still somewhat unclear on what you want to do.

    Please include this and I will ask another question. When you say appear in the combo box, do you want them available to select or already selected and if so, are they items already available in the combo box for selection?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @WarrenBelz sorry about that i attached the image but i am not sure what happened. 
    Gallery with edit button is below;

    Besides it there is the edit form;

    now as you see i have some pre-populated data in the combo box and that is based on the region drop down selection; below is the code for it ; 

    Filter(ppn,Region = DataCardValue14_1.Selected.Value).Title

    Now when i click on the edit button i want the previously selected item DF786 selected in the combo box and also other items to be available there for selection  which would be based upon the above formula; 

    so if the user has created a new item with DF786 as the Project Number , if he wants to edit it he can click on the edit button and when the form appears it should show DF786 selected but also allow him to select other projects too as he might want to update that record. does it make sense now?

    image.pngimage.png

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous :

    Do you want to automatically select the options in the second combo box(PPN) based on the selection of the first combo box(Region)?

    Do you want to update the record by using the return value of the combo box(PPN)?

    Could you tell me:

    What is your gallery’s data source? SharePoint? CDS? Collection?

    What are the edit form’s items/Datasource property?

    Are “Regin” and “PPN” the two fields in your gallery's data source?

    What are “region” and “PPN”‘s data type?Text? Or lookup?

    Does these combo box allow multiple selections?

    Because I don’t know the detials about your data source, data type, and controls, I can only give the following three suggestions:

    • Firstly, the first thing I want to remind is that the return value of the combo box is a record(do not allow multiple selections) or a table(allow multiple selections). You need to pay attention to whether it’s data type matches the data type of “PPN”.
    • Secondly, If you need to set the default options of the Combo box control, I suggest you use DefaultSelectedItems
    • If the “PPN”’s date does not match the type of the return value of the combo box, I suggest that you can convert the return value of the combo box into the data type you need by modifying the UPDATE property of the data card.

    I’ve made a test for your reference:

    I assume PPN is “Text” type and the combo box allow multiple selections.

    The combo box:

    Item:

     

    ppn

     

    DefaultSelectedItems:

     

    Filter(ppn,Region=DataCardValue14_1.Selected.Value) /* set default selected items */

     

    DisplayFields:

     

    ["Title"]

     

    The data card:

    Update:

     

    Concat(ComboBox2.SelectedItems,Title,";") /* convert table to string */

     

     

    I think this link will help you a lot:

    Combo box control in Power Apps

    If your problem is still not resolved, you can provide more detailed information so that we can help you better.

    Best Regards,

    Bof

    1.jpg
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @v-bofeng-msft my requirement is to see the return value of combo box at the time of creation of request selected in the edit form. i also want the other projects to be available based upon region selection within the combo box so i can add other projects to the record too.

    Data source : SharePoint

    this is the edit button code within the gallery ; Set(editformdata,Gallery4_4.Selected);   

    item property of the form is ; editformdata 

    Datasource is the list name.

    Only PPN is there in the gallery data source. but the region data gets saved to the list.

    Datatype : Text

    Multiple selections is enabled

     

    the solution provided selects all the projects based upon the region which i do not want, i want those projects to be made available within the combo box for selection , however i want the previously saved project in combo box by user at the time of creation of new data.

    if you need any more clarifications do tell me.

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous :

    Maybe you can try this solution:

    The combo box:

    Item:

     

    Filter(ppn,Region=ataCardValue14_1.Selected.Value||Title in Parent.Default) /*Options include specified record and default record*/

     

    DefaultSelectedItems:

     

    Filter(ppn,Title in Parent.Default) /*default selection*/

     

    DisplayFields:

     

    ["Title"]

     

    The data card:

    Update:

     

    Concat(ComboBox2.SelectedItems,Title,";") /* convert table to string */

     

     Best Regards,

    Bof

  • WarrenBelz Profile Picture
    156,774 Most Valuable Professional on at

    @Anonymous ,

    I have been offline for a few hours - please tag whoever you want to continue this thread with - I will respond to your post accordingly as three way conversations generally do nothing but confuse everyone.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @v-bofeng-msft  well i modified defaultselecteditems to this ; Filter(ppn,Title = Parent.Default) but it gave me multiple records as it has multiple Projects with the same name. so i would want a distinct value. 

    image.pngi modified your items property code to this and it works fine. Filter(ppn,Region=DataCardValue14_1.Selected.Value)

    however, the selected item is an issue as it does not show distinct value and when i tried using distinct it gives an error.

    it also does not work if the items previously selected were more than 2.

  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @jayant1 :

    Maybe you can try this solution:

    The combo box:

    Item:

     

    Distinct(Filter(ppn,Region=ataCardValue14_1.Selected.Value||Title in Parent.Default),Title) /*Options include specified record and default record*/

     

    DefaultSelectedItems:

     

    Filter(Distinct(Filter(ppn,Region=ataCardValue14_1.Selected.Value||Title in Parent.Default),Title),Result in Parent.Default) /*default selection*/

     

    DisplayFields:

     

    ["Result"]

     

    The data card:

    Update:

     

    Concat(ComboBox2.SelectedItems,Result,";") /* convert table to string */

     

     Best Regards,

    Bof

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 225

#3
M Bilal Khan Profile Picture

M Bilal Khan 192

Last 30 days Overall leaderboard