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 / Dropdown On Select not...
Power Apps
Answered

Dropdown On Select not working properly

(0) ShareShare
ReportReport
Posted on by 2 Moderator

Hello,

 

I'm trying to do cascading dropdowns on Lookup columns in a Sharepoint list.

 

A teacher selects one of the schools where he works (filtered dropdown column), then he gets in the next dropdown all the classes at that school that he teaches... as a result, he will get a gallery with his students.

 

I created collections for both the schools and the classes.

The first collection is filtered for the teacher, the second for the teacher and the school.

I clearcollect the collections OnChange and OnSelect of every dropdown.

 

What's odd is: when I select a different school, the selection in classes does not change. But when I click the value in the first dropdown, it will change. 

I set a variable to the selected value in the dropdown, and it changes only when I click the Dropdown again (!) hafter changing it.

 

I'm at a loss how to deal with this.

Categories:
  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @schwibach ,

     

    Please try:

    1\ Move the collect schools collection to OnVisible of this screen, set schools dropdown Items to this collection

     

    2\ Set OnChange of the schools dropdown to create the classes collection

     

    3\ Use classes collection in Items of classes dropdown.

     

    4\ User classes dropdown selected value to filter the students gallery.

     

    OnSelect property would be triggered when you tap/click on a control.

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • schwibach Profile Picture
    2 Moderator on at
    ClearCollect(colKlassen;Filter(Corona_Test_Lehrer_in_Klassen;Lehrer.Email=varUserEmail;Schule.Value=Dropdown_Schule_Test_erfassen.Selected.Result).Klasse);;
    ClearCollect(colTests;Filter(Corona_Test_Schüler;Klasse.Value=Dropdown_Schule_Test_erfassen.Selected.Result;Schule.Value=Dropdown_Klasse.Selected.Result));;
    //Set(varSchule;Dropdown_Schule_Test_erfassen.Selected.Result);;
    //Set(varKlasse;Dropdown_Klasse.Selected.Result);;

     

    I did exactly that and it's working. For some weitd reason, it doesn't work if I keep the Set variables functions in. Any ideas why that is?

    Or should I use a different function to keep these values for other screens?

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 360 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 325

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard