cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Super User
Super User

Cascading dropdown blank value by default

I have two dropdowns. First dropdown looks at a sharepoint list, second dropdown uses the first dropdown as a filter for the same sharepoint list. 

 

Dropdown1 function: 

Sort(
    Distinct(
        SharepointTable, ColumnName1),Result)

 

Dropdown2 function: 

Distinct(
    Filter(
        SharepointTable,
        ColumnName1=dropdown1.Result), 
        ColumnName2)

Problem: As soon as I make a choice in Dropdown1, Dropdown2 is populated with values. This negates the "Required" error validation. I want Dropdown2 to be blank by Default (showing red asterisk). When user clicks the chevron, filtered values appear and user is able to select one. Upon selection red asterisk disappears. 

4 REPLIES 4
Community Support Team
Community Support Team

Re: Cascading dropdown blank value by default

Take a try to see if the following would help:

1. Under the OnSelect property of the first Dropdown, input the following:

Collect(ClearCollect(Collection2,{Result:""}),
        Distinct(
            Filter(
              SharepointTable,
              ColumnName1=dropdown1.Selected.Value), 
              ColumnName2)
        )

Then under the Second Dropdown, put the Collection2 at the items property:

Collection2

See if this would meet your requirements.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
lyoung
Level: Powered On

Re: Cascading dropdown blank value by default

I tried the above solution @v-micsh-msft as I have the same issue as @ericonline. It worked in the sense that it changed the second dropdown to (Blank) however none of the other selections appear now in dropdown2.  Any suggestions?

lyoung
Level: Powered On

Re: Cascading dropdown blank value by default

I solved it in my scenario by:

 

1. Under Items of first Dropdown:

 

 Sort(Distinct(Sharepoint Table Name,Category1),Result)

 

2. Under Items of Second Dropdown:

 

(Sort(Distinct(Filter(Sharepoint Table Name,Category1=Category_Dropdown.Selected.Value),Category2),Result&Blank()))

 

That is all mainly just adjusting Items property of Second Dropdown.  I did not set any OnSelect property. In addition in my Sharepoint Table I used the Quick Edit Feature to insert a blank line first in the list.

lavint
Level: Powered On

Re: Cascading dropdown blank value by default

Hi,

 

This works but the value is also blank now on my edit form.. so both new and edit forms have blank default.

Thought?

 

Thanks!

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 373 members 4,377 guests
Please welcome our newest community members: