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 / When select items from...
Power Apps
Suggested Answer

When select items from gallery, get those items into a combobox value or other.

(1) ShareShare
ReportReport
Posted on by 963 Season of Giving Solutions 2025
Hi!
 
I have a combobox that only appears with codes, but that code is equal to a description. The thing I want is to create another a list in a sharepoint with the code in one column and the description into another and get it in the APP. Then, be able to select multiple values of that gallery and send it into the first combobox only as the code. Its not necessary to be a combobox, but in case they need to edit it, i guess it would work.
Like click into a button and make visible that gallery, and once the items are selected make the values selected appear.
This is the part of the form:
So, I dont want to add the description next to the code because it would contain a very large value inside the combobox and its maybe not the best option.  So maybe create a button that makes visible a container with the gallery, select items from there. 
 
If I read the description when consulting it it would be so long.
 
This is when create a new item, maybe later it would be needed to modify them, so would do the same into another screen. But I am thinking right now, could I create some roles and depending who it is, get the description or the code right? Maybe this is the best option.
 
How can I make it work? What would you all do?
Categories:
I have the same question (0)
  • Suggested answer
    MS.Ragavendar Profile Picture
    7,613 Super User 2026 Season 2 on at
     
    I couldn't able to create the exact structure as backend so I went on creation of Sample Collection in App OnStart
     
    ClearCollect(
        colUPCodes,
        {
            Code: "00050",
            Description: "Description for UP Code 00050"
        },
        {
            Code: "00051",
            Description: "Description for UP Code 00051"
        },
        {
            Code: "00052",
            Description: "Description for UP Code 00052"
        },
        {
            Code: "00054",
            Description: "Description for UP Code 00054"
        },
        {
            Code: "00055",
            Description: "Description for UP Code 00055"
        },
        {
            Code: "00060",
            Description: "Description for UP Code 00060"
        },
        {
            Code: "00066",
            Description: "Description for UP Code 00066"
        },
        {
            Code: "00068",
            Description: "Description for UP Code 00068"
        },
        {
            Code: "01097",
            Description: "Description for UP Code 01097"
        }
    )
     
     
    Screen (ComboBox)
     
    • Set the Layout as Double and Set the Primary Test as 00050 Column and Secondary Field as Description column.
    • The description won't render in the screen but while selecting the values they can be able to view the relevant values.
     
     
     
    Gallery (Items)
     
     
     
    ✅If this helped, please Accept as Solution to help others ❤️ A Like is appreciated 🏷️ Tag @MS.Ragavendar for follow-ups.
  • Suggested answer
    Valantis Profile Picture
    7,006 Super User 2026 Season 2 on at
     
    MS.Ragavendar's double layout ComboBox is the right display approach. For the gallery-based selection pattern you described (button opens gallery, user selects multiple items, codes appear in the ComboBox):
     
    1. Add a collection to track selections: ClearCollect(colSelectedCodes, {}) in App OnStart
    2. Gallery Items: your SharePoint codes list
    3. Each gallery row has a checkbox or toggle. OnCheck:
    Collect(colSelectedCodes, {Code: ThisItem.Code, Description: ThisItem.Description})
    OnUncheck:
    Remove(colSelectedCodes, ThisItem)
    4. Set the ComboBox DefaultSelectedItems to colSelectedCodes and Items to your full codes list. The ComboBox shows only codes but users can see descriptions in the double layout when selecting.
    5. When saving, use Concat(colSelectedCodes, Code, ",") to store the selected codes as a comma-separated string in SharePoint.
     
    For the roles idea: you can show ThisItem.Code or ThisItem.Description in the gallery label based on the user's role:
    If(userRole = "Manager", ThisItem.Description, ThisItem.Code)
     
      Best regards,

    Valantis   ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/ 💼 LinkedIn ▶️ YouTube
  • Charlie Martharper Profile Picture
    963 Season of Giving Solutions 2025 on at
    Hi!
     
    When using that, it always return red in the name of the list. Why is that happening?
     
    I created it in the combobox.
    And that works but I dont know why in the OnStart is not working. Its getting the info from the list in this case. 
  • Charlie Martharper Profile Picture
    963 Season of Giving Solutions 2025 on at
     
    Another thing is happening in the another screen is this:
     
    In the combobox it doesnt return me the values that appear in the text label.
    I added this in the datacard but it seems it doesnt get the column right dont know why. It is a multichoice column values.
     
    It has this in the label: 
    Concat(ThisItem.UP_origen; Value; ", ")
     
    When creating the row there is no problem, but when wanting to edit it this happens.
     
    To solve it I would need to make the values appear in the combobox.What am I missing?
     
  • MS.Ragavendar Profile Picture
    7,613 Super User 2026 Season 2 on at

    I see the Datasource /Collection Name (Codis) which is underlined in red, it may be because:

    • You copied the formula into a control instead of App.OnStart.
    • There is a no syntax error earlier in the formula.
    Can you paste the full formula which you have tried.
     
    ✅If this helped, please Accept as Solution to help others ❤️ A Like is appreciated 🏷️ Tag @MS.Ragavendar for follow-ups.
  • Charlie Martharper Profile Picture
    963 Season of Giving Solutions 2025 on at
    ClearCollect(
        Codis;
            // AGA Tarragona
            {Title: "00050"; Descripció: "E - La nja)"};
            {Title: "00051"; Descripció: "Enja - Treforta)"};
            {Title: "00066"; Descripció: "EAP Tame I)"};
            {Title: "00052"; Descripció: "EAP Taant Pau)"};
            {Title: "00068"; Descripció: "EAPaco)"};
            {Title: "01097"; Descripció: "Eador - Pos)"};
            {Title: "07695"; Descripció: "Lína"};
            {Title: "00065"; Descripció: "Eu"};
            {Title: "00041"; Descripció: "Eí"};
            {Title: "00060"; Descripció: "EAell"};
     
            // AGA Reus
            {Title: "00061"; Descripció: "EAPere"};
            {Title: "00047"; Descripció: "EA Pere"};
            {Title: "00062"; Descripció: "Ebertat"};
            {Title: "00048"; Descripció: "EAera Mió"};
            {Title: "07696"; Descripció: "Línia eus"};
            {Title: "00045"; Descripció: "EAP Mp"};
            {Title: "00040"; Descripció: "E el Cp"};
            {Title: "00042"; Descripció: "EAP Fet"};
            {Title: "00059"; Descripció: "EAP Coudsant"};
     
            // AGA Conca de Barberà - Alt Camp
            {Title: "00044"; Descripció: "EAP nc"};
            {Title: "00055"; Descripció: "EAP p Est"};
            {Title: "00054"; Descripció: "EAP Vbà"}
        )
     
    Check if you can the last thing about the defaultselectitems please.
  • MS.Ragavendar Profile Picture
    7,613 Super User 2026 Season 2 on at
     
    In the Default Selected Item of CB
    Filter(
        Codis;
        Title in ForAll(
            Parent.Default;
            Value
        )
    )
    
    //If Parent.Default does not work, use the below
    
    Filter(
        Codis;
        Title in ForAll(
            ThisItem.YourColumNName;
            Value
        )
    )
     
    Data Card Update
    ForAll(
        comboboxControlName.SelectedItems;
        {
            Value: Title
        }
    )
     
    ✅If this helped, please Accept as Solution to help others ❤️ A Like is appreciated 🏷️ Tag @MS.Ragavendar for follow-ups.
  • Charlie Martharper Profile Picture
    963 Season of Giving Solutions 2025 on at
    In the datacard update I have an error:
    Why is this happening? Shall I change the title value? It should change a column but when using the patch that part doesnt work.
    I have 2 lists:
     - 1 list with the code with description
     - 1 list with the full registration with information
     
    In case a registration is already done, in that screen maybe it has to change the combobox values.
    When they finish the modifications, click a button with this:
    In this case, I did that and it didn't work, it let that part blank when before it was 9 values in the comobox. Maybe the update datacard value is not right. Why is fully red?
  • MS.Ragavendar Profile Picture
    7,613 Super User 2026 Season 2 on at
     
    ComboBox name - ComboBox1, Collection - Codis , SharePoint multiple value-choice column - UP_origen and form - Form1 - This is the architecture right ?
    ForAll(
        ComboBox1.SelectedItems As rec;
        {
            Value: rec.Title
        }
    )
     

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

#2
11manish Profile Picture

11manish 159 Super User 2026 Season 2

#3
sannavajjala87 Profile Picture

sannavajjala87 89 Super User 2026 Season 2

Last 30 days Overall leaderboard