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 / Difficulty with Combobox
Power Apps
Answered

Difficulty with Combobox

(1) ShareShare
ReportReport
Posted on by 7

So I just discovered Powerapps, I'm trying to do a combo box to look up a job number out of a table in an on-premises SQL server.

 

The data source connects nicely. It defaults to display the "AFE" field from my table, which isn't what I want, but at least it's pulling data. Here's what I don't understand:

 

There's a property here called "Value" under the "Items" property. What is this supposed to do? Changing this seems to have no effect on the behaviour of the combobox. I want to display the "ClientJobSAPCode" field, but selecting it here has no effect. Am I missing or misunderstanding something here?

1.PNG

When I set Displayfields to ["ClientJobSAPCode"], I get the items I want in the dropdown. However, search doesn't work properly. It seems to still be searching the AFE field. I reasoned that I should set ["ClientJobSAPCode"] in the "SearchFields" property as well. Problem is, right after I enter that, it changes itself back to ["AFE"]. 

 

I seem to be able to set the SearchFields property to ["AFE", "ClientJobSAPCode"], which causes the combobox to search both of those fields. If I try to again edit this to remove "AFE", leaving only "ClientJobSAPCode", the property changes itself back to just "AFE".

 

This seems like such an odd problem, I feel like I'm missing something fundamental. Any ideas?

 

Thanks,

Ryan

 

 

 

 

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

    I had a similar problem using the web editor.  Try doing it in the studio and see if you have the same problem. 

  • yyc_ryan Profile Picture
    7 on at

    Similar results in Studio, it keeps changing back to the AFE field.

  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    I had the same type or problems with Azure DB.  I finally got it to work. I just confirmed this worked for me.

    Create the combobox. 

    Change the Value field and save.

    Type in the value you want for  the Display field and save.

    Delete the SearchFields and save. 

    Type in the value you want for the SearchFields and save.

     

  • Community Power Platform Member Profile Picture
    on at

    An update to my post.  I found that the Display and Search Fields would revert back to different field after a period of time.  It looked like it was choosing the first field in the table in Alpha order.  In my case I am working a proof of concept so I just renamed the field I wanted for Dispaly and Search  to start with AA.  Looks like it is working.  I will post again if this changes.

  • gog Profile Picture
    47 on at

    Hi all-the-supporting-members-that-are-outstanding-in-tis-community!

     

    I have EXACTLY the same problem. 
    When I push the field of "SearchField" I cannot search in the table that I want. Why???

     

    The datasource I builton is CDS and I have checked that the field I want to search is ALSO searchable.

    So I dont really understand this.


    Please help and advice. 

     

    1.png2.png

  • PD Profile Picture
    9 on at

    I had the same problem. After a couple of jumps against the wall i tried this:

     

    1. In OnVisible event of screen load datasource to collection - ClearCollect(myDataSource,'[dbo].[ClientsJobs]')

    2. Set myDataSource as Items of ComboBox

    3. Set DisplayFields and SearchFields as you need

     

    And voila, everything suddenly works.

     

    Give it a try.

     

    Pavel

  • larspeterson Profile Picture
    42 on at

    I was not able to replicate ACC's fix. However, I was able to fix this by just adding the search field that I wanted as a secondary search field, which worked fine for me. 

     

    So, instead of just trying to use ["ClientJobSAPCode"] as the SearchFields property, I would use ["ClientJobSAPCode", "AFE"]. Won't work for everyone, but hope it helps someone.

  • RConsulting Profile Picture
    2 on at

    I'm having this same problem... but with a collection based on a sharepoint list. This seems like a really long-standing bug. Is MS aware of it?

  • Community Power Platform Member Profile Picture
    on at

    Still a problem on 3.19033.13.  At times it wipes out DisplayMode and SearchMode and replaces with some other field from t he data source.  Appears to happen when you edit the "Items" field.  VERY annoying...  

  • PallaviCloud-12 Profile Picture
    3 on at

    Hello,

    I am facing same issue. Actually I am using People/person field and connect to Office365Users to get user name. So how can I use ClearCollect in this case.

     

    Please help. Thanks

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