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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / ComboBox Display onto ...
Power Apps
Answered

ComboBox Display onto a Label

(0) ShareShare
ReportReport
Posted on by 59

Hi,

 

I am new to PowerApps and I have a ComboBox with a list of IDs from an imported Excel File (~15000 rows). When the user selects some particular IDs, a view-only label should list the corresponding Name of the person then write it to a column in another file. For instance:

 

Table Name: ExampleTable

Column: ID, Name

IDName
ID-01234Joe Pringles
ID-23456Billy Crisps
ID-13729Flavor Dorito
ID-39174Sun Chips

 

So if the user selected "ID-01234" and "ID-13729" in ComboBox3, a label would display "Joe Pringles, "Flavor Dorito" then write these values into another table, SnackTable, in columns snackID and snackNames

 

My current code looks like:

Data Card for ComboBox3

      Update:  ComboBox3.Selected.'ID'

      ThisItem: ThisItem.'snackID'

ComboBox

      Items: ExampleTable.'ID'

 

Data Card for Label

       Update: DataCardValue.Text

       ThisItem: ThisItem.'snackNames'

 

Text Input/DataCardValue

       Default: Concat(Filter(ExampleTable, ExampleTable.'ID' = ComboBox3.Selected.'ID'),  ExampleTable.'Name' & ", ")

 

The issue seems to be with the formula where it is comparing a table to text, but regardless I am doubtful that this is even the right method to do it. Ideally for every ID the user selects, a new record/row in the table would be made with all the same information except for that ID and Name, but that is the next problem for me to tackle. Any help with this issue would be much appreciated!!

Categories:
I have the same question (0)
  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @AgarDoge could you please share your screen to get a clear picture of what you want. 

  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @AgarDoge 

    You will need to make your Item property of the Combobox to be less restrictive.  Currently you are only returning a table with a column called ID.  This is missing the rest of the data that you will need (Name).

     

    Change your ComboBox3 Items property to ExampleTable

    I am not entirely sure what you expect to write into the column snackID as your combobox will be allowing multiple selections.  So your Update property for the combobox datacard is only going to submit one selection to that column.

     

    Change the Text property of your Label (DataCardValue) to :  

    Concat(Combobox3.SelectedItems, Name & ", ")

     

    This will cover submitting the values you want.  It will not cover editing existing records.  You did not mention that as a need, but if so, then I'd need to know more about the purpose of the snackID column and how that would relate to multiple selections.

     

    I hope this is helpful for you.

  • AgarDoge Profile Picture
    59 on at

    That fixed my issue with the label, but now that the Items of my ComboBox is the full table, it is showing values from other columns instead (so in this example, the Name values are in the ComboBox instead of the IDs).

     

    In general, would you say it's a good practice to set the Items property of a dropdown/ComboBox as the full table then retrieve the columns as needed or is it usually better to set the Items property as the intended column? 

     

    For snackID, what my intention was that in snackTable, if the user selects multiple IDs, a new record would be made for each ID with all of the same information except for the ID and Name. So for example:

     

    ExampleTable

    IDName
    ID-01234Joe Pringles
    ID-23456Billy Crisps
    ID-13729Flavor Dorito
    ID-39174Sun Chips

     

    User in a form enters: "Price" = 3; "Is It Good" = Yes

    Selects ID-01234 and ID-23456 (corresponding to Joe Pringles and Billy Crisps

     

    In snackTable

    Entry IDNamePriceIs It Good
    1ID-00000Apple Chips1Yes
    2ID-00001Mango Chips6No
    3ID-01234Joe Pringles3Yes
    4ID-23456Billy Crisps3Yes

     

    Where the user doesn't have to re-submit another form in order to capture the information. When the user selects both ID values it adds 2 records to snackTable with the same previously entered information. Is there a way to do this, or to do a "copy"-like feature where a new form is pre-populated with the already entered info and just the ID and Name changes? This example has only 4 columns but for my application, there is ~20-25 columns and so there is more of a need to pre-populate/automatically add a new record with the same info except for those 2 columns,

     

    Thanks for the help so far!

  • AgarDoge Profile Picture
    59 on at

    Never mind about the Name values showing up in the ComboBox, I realized when I switched the Items property I forgot to update the DisplayFields and SearchFields. 

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @AgarDoge 

    Glad you sorted that out.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard