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 / Issues with Multi-Sele...
Power Apps
Unanswered

Issues with Multi-Select ComboBoxes and storing selected values in SharePoint

(0) ShareShare
ReportReport
Posted on by 34

I'm facing several issues with multi-select combo boxes and would like to seek advice.

 

Let me start with the lookup columns. There are two columns in my main SharePoint list, ManufacturerCode and ProductCode:

nouptime_0-1629087164717.png

 

nouptime_1-1629087203660.png

 

There is also a lookup column Countries within the Manufacturer Product Mapping list, which is similarly set up as the lookup column Country in my main SharePoint list:

nouptime_2-1629087510263.png

 

I have three combo boxes in a PowerApps form linked to the respective lookup columns in my main list; Country, ManufacturerOrg and ProdCode:

ComboBox1 DatacardValue20

 

Choices([@ItemList].Country)

 

ComboBox2 DatacardValue21

 

Items = ShowColumns(
 Filter('Manufacturer Product Mapping',Country.Id = DataCardValue20.Selected.Id
 ),
 "Title",
 "ID"
)

OnChange = Clear(ManufacturerCollection);
ForAll(
 DataCardValue20.SelectedItems As MOrgSel,
 Collect(
 ManufacturerCollection,
 ShowColumns(
 Filter(
 'Manufacturer Product Mapping',
 MOrgSel.Value in Title
 ),
 "ID",
 "ProdCode",
 "Title"
 )
 )
);

 

ComboBox3 DatacardValue22

 

Items = ShowColumns(
 Filter('Manufacturer Product Mapping',Title = DataCardValue21.Selected.Value
 ),
 "ID",
 "Title",
 "ProdCode"
)

 

 

Here are a few challenges I'm currently facing:

1. How can I use Distinct within ShowColumns, i.e. in ComboBox3 ?

 

ShowColumns(
 Filter('Manufacturer Product Mapping',Title = DataCardValue21.Selected.Value
 ),
 "ID",
 "Title",
 "ProdCode"
)

 

2. I would like to automatically display the matching ProdCode in ComboBox3 whenever a ManufacturerOrg value is selected. Tried this code but only a single ProdCode (i.e. last selected item) is displayed when multiple ManufacturerOrg values are selected:

 

DefaultSelectedItems = RenameColumns(Distinct(Filter('Manufacturer Product Mapping',Title in DataCardValue21.Selected.Title),ProdCode),"Result","Value")

 

3. All of this sort of works, but I am only able to store a single selected item from ComboBox2 and ComboBox3 in my main SharePoint list. How can I make sure all the selected items are returned to SharePoint when the form is submitted?

 

Not sure if I'm moving in the right direction here, any advice would be very much appreciated.

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @nouptime :

    Q1:How can I use Distinct within ShowColumns, i.e. in ComboBox3 ?

    You could try:

    With(
     {
     TheSource: Filter('Manufacturer Product Mapping',Title = DataCardValue21.Selected.Value)
     },
     ShowColumns(
     ForAll(
     Distinct(TheSource,"ProdCode"),
     LookUp(
     TheSource,
     ProdCode = TheSource[@ProdCode]
     )
     ),
     "ID",
     "Title",
     "ProdCode"
     )
    )

    Q2:I would like to automatically display the matching ProdCode in ComboBox3 whenever a ManufacturerOrg value is selected. Tried this code but only a single ProdCode (i.e. last selected item) is displayed when multiple ManufacturerOrg values are selected.

    Please try:

     

    With(

        {

            TheSource: Filter('Manufacturer Product Mapping',Title in DataCardValue21. SelectedItems.Value)

        },

        ShowColumns(

            ForAll(

                Distinct(TheSource,"Title"),

                LookUp(

                    TheSource,

                    Title = TheSource[@Title]

                )

            ),

            "ID",

            "Title",

            "ProdCode"

        )

    )

     

    Q3:All of this sort of works, but I am only able to store a single selected item from ComboBox2 and ComboBox3 in my main SharePoint list. How can I make sure all the selected items are returned to SharePoint when the form is submitted?

    The data in DatacardValue21 and DatacardValue22 cannot be submitted correctly because the data format is incorrect.

    If you want to update the lookup field, the data source (items) of the combobox must come from Choices([@ItemList].TheLookUPField)

    Best Regards,

    Bof

     

     

     

     

  • vidyadhar Profile Picture
    33 on at

    For showcolumn function, it will return the column.

    Distinct(ShowColumns(tablename,column_name)) =>this will give the distinct values.

    Please, find the below links for your reference

    link for distinct:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-distinct

    link for DropColumns:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-table-shaping

     

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 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard