cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ToreG
Frequent Visitor

Dropdown list default blank, when using a SQL Table as DataSource.

Hi Community. 

I have a problem, 
When I add data into a dropdown list it default starts with the first value in the column. 
I have seen different solutions when using sharepoint as datasource, but I use SQL tables as source. 

Br. Tore

1 ACCEPTED SOLUTION

Accepted Solutions
ajennings1
Resolver I
Resolver I

@ToreG ,

You could add your SQL table to a collection then create a blank row in order to default on e.g.

 

ClearCollect(colExample, {Field: ""}); Collect(colExample, <yourSQLtable>)

Then on your dropdown, set the items to colExample and the default to "1" to select the blank record.

View solution in original post

6 REPLIES 6
yashag2255
Dual Super User II
Dual Super User II

Hi @ToreG 

 

Yes, by default this selects the first item in the dropdown items, if you wish to set this to other item, then you can set the "default" value of the dropdown control.
 
If you need help with constructing the formula for it, please share the logical implementation so that we may help you better.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
ToreG
Frequent Visitor

Hej Yashag2255. 

But if the default value is set to "" and the dropdown is still showing the first value in the column. 

I have column A with 20 values, and i dont want it to show any values before the user pick one from the dropdown. 


yashag2255
Dual Super User II
Dual Super User II

Hi @ToreG 

 

That is the default configuration of the dropdown control to select the first item if default is not set.
 
If you wish to keep the selection as empty, you can create a combobox control instead of dropdown, use the same items in the combobox control and disable "Allow Searching" if you do not wish to search through the items.
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Hi @ToreG 

If you want to use the DropDown control rather than the ComboBox control, a possible workaround would be to use a SQL View. In the View, you would UNION a row with an empty string to provide your blank option. Post back here if you need more details.

ajennings1
Resolver I
Resolver I

@ToreG ,

You could add your SQL table to a collection then create a blank row in order to default on e.g.

 

ClearCollect(colExample, {Field: ""}); Collect(colExample, <yourSQLtable>)

Then on your dropdown, set the items to colExample and the default to "1" to select the blank record.

View solution in original post

ToreG
Frequent Visitor

Thanks Ajennings1. 

 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,497)