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 / Cascading drop-downs e...
Power Apps
Unanswered

Cascading drop-downs errors

(0) ShareShare
ReportReport
Posted on by 818

So I have a bit of a complex (at least for me, lol) Sharepoint list form in Powerapps. What I want to accomplish in some fields is having dependent dropdowns depending on what was chosen on a 1st dropdown. This is for Country/State/City/District. I'm populating those fields on Excel files that have that data for the two countries I need. The flow I wanna create would be for example: 
-Choose USA in that 1st dropdown (country)

-Then the next will show Texas, NY, etc. (state)

-The next if you chose NYC, will show NYC, New Jersey (city)

-The next will show Brooklyn, Manhattan (district)

 

I got that to work with my two countries following these steps:

- Each Data Card has 2 dropdowns, depending on what country was chosen. I set the "Visible" property depending on the Selected.Value of each.

- Once each one is visible, these are the following properties in each one (same code, only changing the Excel file or table name)

In the OnChange of the State DataCard

If(
 !IsBlank(ComboBox2.Selected);
 Set(
 ProvinciasFiltradas2;
 Filter(ExcelTable; State = ComboBox2.Selected.State)
 )
)

So it creates "ProvinciasFiltradas2", that I can then use in the following comboBox to have the cities of that state.

Items set to "ExcelTable" for that State DataCard.

-Then the City DataCard, same process for the OnChange:

Items this time is set to ProvinciasFiltradas2

If(
 !IsBlank(ComboBox3.Selected);
 Set(
 ProvinciasFiltradas;
 Filter(ExcelTable; City = ComboBox3.Selected.City)
 )
)

And for District DataCard, items is set to "ProvinciasFiltradas"

 

All columns in Sharepoint are text type.

 

For other list when I'm sending a combobox data to a text column in Sharepoint, I've used {SharepointColumnName: Parent.Default} in the DefaultSelectedItems so that it retains the info saved on the App once you go to edit already created items.

 

Each datacard was changed on the Update property:

If(
 DataCardValue11.Selected.Value = "USA";ComboBox2_1.Selected.State;
 DataCardValue11.Selected.Value = "UK";ComboBox2.Selected.State)

So that it updates to the correct country

 

 

However I'm getting this error when trying to use the app from Sharepoint: "
Error when trying to retrieve data from the network: Expression "State eq null" is not supported. clientRequestId: 7ee5c48a-49c3-4575-b6a3-4a09d28e459a serviceRequestId: 8668a307-e069-41a2-9365-cdf4e8e2fefc; 1dd0a953-376d-4929-8a9e-e61194d367a1; 684F3C68-C175-4937-AE16-AA613D868E8C"

 

Another identical error but with ""District eq null" this time. I am unable to test if this happens if those fields are not blank, as the app doesn't retain the selected items, so every time you open an item, everything will be blank. 

still.. Dunno why I'm getting that error, becase when I use the "Set" code, I'm also using the !IsBlank, so it should only "Set" that when is NOT blank....

But anyway. If you know a way to fix this, or even a simpler method to acheive this... As I would like to only have 1 combobox per DataCard, but couldn't figure out the conditionals for that.


Anyway, apologies for long post but really appreciate your input!

Categories:
I have the same question (0)
  • mmbr1606 Profile Picture
    14,605 Super User 2025 Season 2 on at

    hey @WorkingRicardo 

     

    you can try the follwing:

     

     

    If(
     !IsBlank(ComboBox2.Selected),
     Set(
     ProvinciasFiltradas2,
     Filter(ExcelTable, !IsBlank(State) && State = ComboBox2.Selected.State)
     )
    )

     

    DefaultSelectedItems: LookUp(ExcelTable, State = Parent.Default)

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

  • WorkingRicardo Profile Picture
    818 on at

    @mmbr1606 ty for your reply! With that code, the selected items stay. But I'm having the following errors:

    - For the OnChange suggestion:

    Delegation warning. The highlighted portion of this formula may not work properly on large datasets. This connector does not support the "And" operation
    The data source may not be able to process the formula and may return an incomplete dataset. The application may not return correct results, or it may not behave correctly if the dataset is incomplete.

     

    Might not be a problem as my data will never grow, and everything is being filtered out correctly. Still, if you know how to fix this, perfect!

     

    - The "eq null" still pops out when there are no elements selected.

     

    I'll copy again my codes with the actual names of everything, as it was sortta confusing pairing everything up xd (mine have some Spanish names)

    On change of combobox:

     

    If(
     !IsBlank(ComboBox2.Selected);
     Set(
     ProvinciasFiltradas2;
     Filter(Tabla2; !IsBlank(CCAA) && CCAA = ComboBox2.Selected.CCAA)
     )
    )
    
    Tabla2= Excel table
    
    CCAA = Excel column name

     

    Default Selected items:

    LookUp(Tabla4; CCAA = Parent.Default)
    Tabla4= Other excel table

     Dunno why is this happening if the trigger for the "Set" is still used chained to the !IsBlank...  😞

  • Verified answer
    mmbr1606 Profile Picture
    14,605 Super User 2025 Season 2 on at

    To address this, you can modify your formula to include an additional check to ensure that the ComboBox selection is not null before performing the lookup or filter operation. Here's an adjusted version of your formula:

     

    If(
     !IsBlank(ComboBox2.Selected),
     Set(
     ProvinciasFiltradas2,
     Filter(
     Tabla2,
     CCAA = ComboBox2.Selected.CCAA
     )
     )
    );

     

    And for the DefaultSelectedItems property:

    If(
     !IsBlank(Parent.Default),
     LookUp(Tabla4, CCAA = Parent.Default),
     Blank()
    )

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard