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 / combo box not showing ...
Power Apps
Answered

combo box not showing all values

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

i am creating an app which shows a list of students and what course they do, i have a combo box which filters the students depending on what course you select. 

however when no course is selected the gallery is empty, i need it so that it shows all the students and then as courses are selected in the combo box it filters the out the students who don't do that course. 

 

here is the code in my gallery 

Filter('ExpoTees.Student', sstudents.Text in StudentName && CourseID in CourseCombo.SelectedItems.CourseID)

this also includes the code to enable them to search the students name which is a seperate text input which does work.

 

Categories:
I have the same question (0)
  • PTBBSolutions Profile Picture
    691 on at

    Hi @Anonymous ,

     

    By the look of your code it seems that the gallery behaves exactly as it should. If you want see all record when nothing is selected, you have to add an If condition:

     

    If(IsBlank(sstudents.Text) And IsBlank(CourseCombo.SelectedItems.CourseID), 'ExpoTees.Student',Filter(.....))
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I have added this code and it’s now come up with loads of errors, it’s now got errors near the students image, students name and the students course on the gallery.

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous :

    please try this code:

    If(
    IsBlank(ourseCombo.SelectedItems.CourseID) && !IsBlank(sstudents.Text),
    Filter('ExpoTees.Student', sstudents.Text in StudentName),
    !IsBlank(ourseCombo.SelectedItems.CourseID) && !IsBlank(sstudents.Text),
    Filter('ExpoTees.Student', sstudents.Text in StudentName && CourseID in CourseCombo.SelectedItems.CourseID),
    !IsBlank(ourseCombo.SelectedItems.CourseID) && IsBlank(sstudents.Text),
    Filter('ExpoTees.Student',CourseID in CourseCombo.SelectedItems.CourseID),
    Filter('ExpoTees.Student', sstudents.Text in StudentName && CourseID in CourseCombo.SelectedItems.CourseID)
    )

    Best Regards,

    Bof

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    ive put this in and the gallery is still blank 

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous :

    Maybe you could try this formula

    If(
    IsBlank(ourseCombo.SelectedItems.CourseID) && !IsBlank(sstudents.Text),
    Filter('ExpoTees.Student', sstudents.Text in StudentName),
    !IsBlank(ourseCombo.SelectedItems.CourseID) && !IsBlank(sstudents.Text),
    Filter('ExpoTees.Student', sstudents.Text in StudentName && CourseID in CourseCombo.SelectedItems.CourseID),
    !IsBlank(ourseCombo.SelectedItems.CourseID) && IsBlank(sstudents.Text),
    Filter('ExpoTees.Student',CourseID in CourseCombo.SelectedItems.CourseID),
    'ExpoTees.Student'
    )

     Best Regards,

    Bof

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    it worked but then when i cleared the filters i added it went blank again

     

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous :

    If you have new questions, I suggest you create a new thread.If so, you can get help from many people to solve the problem in time.

    Best Regards,

    Bof

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    it worked for a second but when i cleared the filters in the combo box the gallery went blank again

  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous :

    Sorry, the formula I provided doesn’t seem to be complete, please try this formula

    If(
    IsBlank(CourseCombo.Selected) && !IsBlank(sstudents.Text),
    Filter('ExpoTees.Student', sstudents.Text in StudentName),
    !IsBlank(CourseCombo.Selected) && !IsBlank(sstudents.Text),
    Filter('ExpoTees.Student', sstudents.Text in StudentName && CourseID in CourseCombo.SelectedItems.CourseID),
    !IsBlank(CourseCombo.Selected) && IsBlank(sstudents.Text),
    Filter('ExpoTees.Student',CourseID in CourseCombo.SelectedItems.CourseID),
    'ExpoTees.Student'
    )

    Best Regards,

    Bof

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

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard