cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
beebul
Level: Powered On

Re: Dropdown default value - set to blank value?

@strategery 

This is great thanks - but it doesn't throw validation error if the field is required...?

strategery
Level 8

Re: Dropdown default value - set to blank value?

@beebul I assume you're talking about my method for "(choose one)"? Somewhere in my posts I mentioned I rarely use the actual forms, so typically I hide the submit button if "(choose one)" is still the selected item.

 

If you use forms and use my method(as below) to put a blank value up front, validation would still work.

 

Screen.OnVisible = ClearCollect(CollectionName, {Fieldname: ""}, DataSource)
Dropdown.Default = ""

(With Items set to <CollectionName> and Value set to <Fieldname>)

 

beebul
Level: Powered On

Re: Dropdown default value - set to blank value?

@strategery  - thanks for the tips very useful, I still can't get it to throw the validation error though 😞

 

I think it maybe because I'm trying to do a patch on the UPDATE for the field..? But not sure why that would affect it?

strategery
Level 8

Re: Dropdown default value - set to blank value?


@beebul wrote:

@strategery  - thanks for the tips very useful, I still can't get it to throw the validation error though 😞

 

I think it maybe because I'm trying to do a patch on the UPDATE for the field..? But not sure why that would affect it?


Well I attempted with a basic SharePoint list and using the SharePoint > PowerApps feature to build a basic form app, so you may have to provide more info about your app. I had trouble myself getting Validate function to work.  Since it's more related to validation, you might make a new topic if you really need it to work, the more people you can reach the better.

Highlighted
Phelzier
Level: Power Up

Re: Dropdown default value - set to blank value?

Bit of a late reply and maybe I'm missing something.


For me I get a default blank by selecting the dropdown box and setting AllowUnsetValue=true

This then makes the field default blank, then you set it to be Required so that the user needs to select a value from the list.

 

Again, I know it's an old post and maybe there's been an update since the post was created.

Henrik
Level: Powered On

Re: Dropdown default value - set to blank value?

@Phelzier  thanks for your input. I dont understand it all, cause as i wrote some time back in this post suddenly everything worked for me as intended without me doing anything.

After that it seemed to me the discussion kind of took a turn and bacame not really what I asked about, but notheless interesting.

 

I think i'm just going to mark your answer as a solution as i think your answer seems like a nice solution (i have not even tried it) but face value alone does it for me in this case 🙂

Henrik
Level: Powered On

Re: Dropdown default value - set to blank value?

Well, this was kind of embarrasing, I thoght I answerd on another topic, so disregard my last post please 🙂 I belived I created this topic - something I did not 😮

Alex_Boom
Level: Powered On

Re: Dropdown default value - set to blank value?

There has been an update recently what fixed this problem.

 

Just go to the advanced settings of your dropdown and set the AllowUnsetValue to true

Now set as Default value the "" 

 

Schermafbeelding 2019-05-13 om 16.10.59.png

 

 

 

 


It should work and looks like this:
Schermafbeelding 2019-05-13 om 16.18.14.png

beebul
Level: Powered On

Re: Dropdown default value - set to blank value?

This is great... That is exactly how I expected it to work.
Thomas_Roberts
Level: Powered On

Re: Dropdown default value - set to blank value?

There needs to be a better way than just adding blanks in your data source. Possible solutions I've thought of but haven't gotten to work ... both require adding values to filtered results which I have not figured out how to do yet. 

 

1. On the "Items" add in a [Blank()] or [""] or [Empty()] to the filtered results;

ITEMS : Filter([Table], ITEM = VAR) && [Blank()]

 

2. Create a seperate list with just one or two blanks and somehow add the two lists together

 

Option 1 would be ideal ... any way this could work?

 

 

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 (6,078)