cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jaylou
Level 8

Setting Default of a Dropdown to empty

Hi All,

I have a drop down control on a welcome screen.  The item is set to pull distinct regions from an SPO list.  On change I am loading BrowseScreen1 with all list items that have a region = dropdown.Selected.  Works perfectly, but when I open the app, the drop down defaults to one of the regions, so if the region I want to use is already there, I can't choose it to move to the browsescreen.  I have to choose another region then come back and choose the region I am looking for.

 

I changed the default from "1" to everything I can think of, "-1" , "0" "" Blank() but nothing seems to blank out the dropdown.  I even added a region called "Select a Region" in the list, but I can't get it to defualt to that either.

 

TIA,

Joe

1 ACCEPTED SOLUTION

Accepted Solutions
HadynM
Level 8

Re: Setting Default of a Dropdown to empty

Hi Joe

My preference is to create a collection that holds the distinct regions, including adding a default '(Select)' value.  Something like:

ClearCollect(colRegions,{Result: "(Select)"});
Collect(colRegions,Distinct(FleetSites,Region.Value));

 

Then for the dropdown control I have:
Items = SortByColumns(colRegions,"Result")
Default = "(Select)"

 

Collections are great for this type of data that is unlikely to change in a single session.  The data is grabbed once and is then local, saving multiple calls to the data source and allowing custom values to be added.

 

Hope that helps

Hadyn

 

View solution in original post

2 REPLIES 2
HadynM
Level 8

Re: Setting Default of a Dropdown to empty

Hi Joe

My preference is to create a collection that holds the distinct regions, including adding a default '(Select)' value.  Something like:

ClearCollect(colRegions,{Result: "(Select)"});
Collect(colRegions,Distinct(FleetSites,Region.Value));

 

Then for the dropdown control I have:
Items = SortByColumns(colRegions,"Result")
Default = "(Select)"

 

Collections are great for this type of data that is unlikely to change in a single session.  The data is grabbed once and is then local, saving multiple calls to the data source and allowing custom values to be added.

 

Hope that helps

Hadyn

 

View solution in original post

jaylou
Level 8

Re: Setting Default of a Dropdown to empty

Thanks Hadyn!!

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,697)