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 / Populate Text Box Base...
Power Apps
Answered

Populate Text Box Based on Value Selected in Combo Box

(0) ShareShare
ReportReport
Posted on by 93

Good Morning Power Apps Community,

 

I have spent a few hours Googling to try and find the proper syntax to rectify the issues I have been having this morning, with no luck.

 

I have an Excel Table, called ToolData, which contains several columns, one of which is called "Tool ID#", and another is called "Tool Description."

 

I have the "Tool ID#" column linked to a Combo Box input. I would like to use a Combo Box input because there are almost 800 rows in this table, and I want to allow users to search instead of having to scroll through the list. I have turned off 'Allow multiple selections' and I have turned on 'Allow searching.'

 

I have a Text Input that I would like to populate with the value in the "Tool Description" field dependent on which Tool ID# is selected from the Combo Box. Seems simple enough, but I have been unsuccessful so far in finding the correct Syntax.

 

Any help is appreciated.

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @JoshAtBrotech 

    What is the Items property of your Combobox?  If it contains the full record, then you can set your Tool Description Default property to :  yourCombobox.Selected.'Tool Description'

     

    I hope this is helpful for you.

  • JoshAtBrotech Profile Picture
    93 on at

    Hi @RandyHayes ,

     

    That worked perfectly, but I was running into an issue where the search function on my Combo Box was not working. I resolved that issue by setting the Items property of my Combo Box to "ToolData.Tool ID#'", but that seems to have rendered my "yourCombobox.Selected.'Tool Description'" useless.

     

    Do you have any suggestions on how to keep the functionality you helped me with but also make the Combo Box searchable?

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

    @JoshAtBrotech 

    Yes, when you specify a column in the Items property, then you will end up with a table with only that column in it...and thus not having the Tool Description that you want.

     

    Put your Items back to ToolData and make sure you have specified the Search column to be Tool ID in the properties.  You would specify the search fields in the SearchFields property, or in the Edit Fields link in the properties pane of the combobox.

  • JoshAtBrotech Profile Picture
    93 on at

    @RandyHayes 

    I do have the Combo Box SearchField set to my Tool ID# column, and the SearchFields property is likewise set to my Tool ID column:

     

    JoshAtBrotech_1-1635349146334.png

     

    However, when I attempt to search the Combobox, no results are shown upon searching:

    JoshAtBrotech_2-1635349189552.png

    Like you said, I cannot change the Items property of the Combo Box to "ToolData.'Tool ID#'", as that will disconnect the other columns from the table.

     

    Any ideas on why my Combo Box search function is not working?

     

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

    @JoshAtBrotech 

    Is Tool ID text or a number?  It needs to be text to be searchable.

     

  • JoshAtBrotech Profile Picture
    93 on at

    @RandyHayes I had read the same after some Googling and yes, I changed the Tool ID# column to a text column. Still, the Combo Box search function is still not working correctly... Hmm...

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

    @JoshAtBrotech 

    So Comboboxes (and other controls) get a little confused when you are changing their base schemas.

    Most likely it is working fine, it is just confused.

    A few things to try (and keep in mind for the future):

    1) Cut (ctrl-x) the combobox from your app and then Paste (ctrl-v) it back.  This will cause the combobox to reinitialize itself.

    2) Select the Items property and Cut it (ctrl-x), then change it to ComboBoxSample, then delete that and paste (ctrl-v) your formula back.  This causes the combobox to reinitialize its schema

    3) If there are changes made at the datasource level - make sure you do a refresh on the Datasource in your datasource list.  If still no joy, then delete the datasource and then add it back.  You might need to perform 1 or 2 above after that as well.

  • JoshAtBrotech Profile Picture
    93 on at

    @RandyHayes 

    I tried all three suggestions multiple times, but still no joy. I suspect something else is going on.

     

    Either way, you have been a great help!

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

    @JoshAtBrotech 

    Well, let's cut it off at the control.

    Change your Items property to : AddColumns(ToolData, "_searchCol", Text('Tool ID #'))

    Then set your Search and Display column to _searchCol

    See if that helps.

  • JoshAtBrotech Profile Picture
    93 on at

    @RandyHayes That did the trick! You are awesome! Thanks so much!

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