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 / Cascading Dropdown Sel...
Power Apps
Unanswered

Cascading Dropdown Selected Value Goes Blank

(0) ShareShare
ReportReport
Posted on by 21

I have two dropdown boxes that are dependent, but reference two different SharePoint Lists. PostionDrpDwn shows different positions within a company, PersonnelDrpDwn values change depending on the selection of the value in PositionDrpDwn. Essentially PersonnelDrpDwn allows the user to only select a personnel name depending on the selection made in PositionDrpDwn. Both drop downs are text based. When the information is saved, values are still present in the form and values are being patched to the final SharePoint list properly. I can confirm the values are also being stored correctly in the defined collection. However, when I navigate away from the screen and come back, the selected value in PersonnelDrpDwn vanishes (PositionDrpDwn value remains).  How do I set the default value for a filtered dropdown that is dependent upon another dropdown's selected value?

 

Your help would be greatly appreciated.

 

Thank you

Categories:
  • freitas_joao_br Profile Picture
    80 on at

    Hello @NK78

    The way that dropdowns works are quite instable, but there as some workarounds. 

    You can change the default selected item of "PersonnelDrpDwn" with a variable, and not directly to other dropdown.

    Change the formula on "OnChage" of PositionDrpDwn to set a variable, then change the PersonnelDrpDwn formula that get values from PositionDrpDwn to the variable that you create. 

    If it's not clear enough, I can build a step by step later.

  • NK78 Profile Picture
    21 on at

    @freitas_joao_br Yes, I am finding this out and it is becoming quite frustrating! I have seen multiple other threads with a similar issue, but there are different variations. In my case, the items for each drop down are as follows:

     

    PositionDrpDwn = Choices([@'List 1'].Position)

    PersonnelDrpDwn =Filter('List 2',Team.Value = PositionDrpDwn.Selected.Value)

     

    The Save Function looks like:

     

    Patch(
        'List 1',
        ShowColumns(
            colGridUpdates,
            "Position",
            "TXT_x002d_PersonnelName",
            "StartDate",
            "EndDate",
            "Departure_x0028_From_x0029_",
            "Travel_x0020_Request_x0020_Title",
            "ID"
        )
    );

    ClearCollect(colGridData, Filter('List 1', 'Travel Request Title'.Value = galtravel.Selected.'Request Title'));Clear(colGridUpdates);Set(varReset, false );Set(varReset, true );
    Notify("Personnel Updates Successfully Saved", NotificationType.Success,3000);
    Reset(FilterDrpDwn);

     

    The function of the dropdown menus work great, the issue is when they are saved in Power Apps, I want those dropdowns to retain their selected values. PositionDrpDwn does retain the value (as do the other datacards), but PersonnelDrpDwn does not. The end goal is to make an editable grid within the powerapp that the user can reference to see which personnel are assigned to a task.

     
  • freitas_joao_br Profile Picture
    80 on at

    @NK78 , try the following approach.

    On PositionDrpDwn:

    1. Enable the option "AlowEmptySelection"
    2. Change "Default" to "varSelected"
    3. Change "OnChage" property to this code:

    Set(varSelected, Self.Selected);

    Set(varSelected2, Blank())

     

     

    On PersonnelDrpDwn:

     

    1. Change your formula: Filter('List 2',Team.Value = varSelected.Value)
    2. Enable the option "AlowEmptySelection"
    3. Change "OnChage" property to this code: Set(varSelected2, Self.Selected)
    4. Change "Default" to "varSelected2

    It should work, just a Note:

    If you're using dropdown, it's the default property, If it's combo box, then "DefaultSelectedItems".

     

    Just add another code that Set the variables to Blank() when you need to Reset the fields.

    Substitute the variables names as you prefer.

    Tell us if it solves your problem : )

  • NK78 Profile Picture
    21 on at

    @freitas_joao_brThanks for the reply. I should note that my app acts like an editable grid and allows the user to add additional rows in a gallery. So when I am setting the variables in OnChange, if I have multiple rows, the value selected in either of the dropdowns populates down in their respective column.

     

    I understand the issue is in the DefaultSelection, but because PersonnelDrpDown is dependent on selections in PositionDrpDown, I cannot figure out how to properly set the default for the personnel selection. Again, when the data is saved, I can see it in the collection and also the Sharepoint list, but I cannot get the Personnel drop down boxes to retain their unique selected values.

  • freitas_joao_br Profile Picture
    80 on at

    @NK78 

    Ok. Got it now. I built an etep by step solution that solve all of your needs:

     

    A solution that don't use OnChange on editable grids

    An simple editable grid that can be improved according to your app

    A bulk Create, Update and Deleting function using collections and SharePoint

     

    I'm going to leave an attachment here with the prints, explaining everything. It took me a while, so tell me if It helped or if you have some questions after testing 😁

     

    Note:

    I'm using PowerApps in another language, so just replace ";" with "," and ";;" with ";".

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
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard