web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Dropdown default value...
Power Apps
Answered

Dropdown default value - set to blank value?

(3) ShareShare
ReportReport
Posted on by 12

I have an edit screen with two dropdowns controls.  The first dropdown is Client and the sceond is ClientProject.  After choosing the client, the user can seleect the specific project for the client.  The ClientProject dropdown is filtering it's list values based on the value of the Client dropdown.

 

When adding a new record, though, after I select a client, the Client Project dropdown always gets set to the first value on the list.  I would preer that it would be left blank.  Is this possible?

 

Thanks,

Dave

Categories:
I have the same question (0)
  • AvenaFernando Profile Picture
    74 on at

    My suggestion is to put in the first cell of the column, a blank cell, without content.

  • v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi Dfin,

     

    Are you configuring the two Dropdown controls on an Edit Form?
    What functions are being used to the Dropdown controls?

     

    Say you are configuring the two dropdown controls on an Edit form, so I created a SharePoint listC as my data source, then created an app based on this list automatically.
    On the EditScreen, I customized the ClientName and ClientProject fields and added two dropdown controls to each of the two fields.
    For ClientName, I set the Items property of the Dropdown control as ListC.Title
    For ClientProject, I set the items property of the Dropdown control as Distinct(Filter(ListC,Title=Dropdown3.Selected.Value),OData__x0064_le0)

    1.png

    But it seems that we are not able to set the Default value of the Project field to Blank. When selecting an ClientName, the corresponding ClientProject would be shown. It seems that it cannot be Blank.

     

    If I misunderstand you, please feel free correct me.

     

    Best regards,
    Mabel Mao

  • abd3127 Profile Picture
    320 on at

    Hi @dfin @AvenaFernando @v-yamao-msft

    Any updates on this query or do we still need to insert a blank row in our data source??

    Thanks

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Good question @dfin, did you ever get it to work as wanted?

    This is something I'm having some trouble to acomplish too, thus i'm trying to make this post become alive again.

     

    I'd rather not make a "Blank" entry option, as this most likely would make my data having lower quality because people most certanly will end up submitting these blank values from time to time 😉

     

    If someone know how to fix this i'd really like to hear about it.

     

    All the best

    H

  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    Have you tried using a combo box instead of a drop down? The combo box doesn't select the first item as the default value.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for your reply @Jeff_Thorpe.

     

    No I have not, I'm not even sure what an ComboBox is 🙂

     

    But I was lucky to discover that if i wrote:

    "Defaults('[MySharepointList]'.Blank())" into the field DefaultSelectedItems i get the desired result (I do get the yellow waring sign though).

     

    H

  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    I haven't test it out but it looks like the code example would make the field blank with an item is new and when you edit the item. Have you tested it out when editing an existing item?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks for your input, and I'll kepp it in mind.

     

    No i have not done that, but you might be right, although, the form I'm usig it for is creating new items only and I think there is no danger for anyone to edit an item because I resets all fields in the form when opening this screen using the "newform" action (or what i should call it 🙂 ). Unless I miss somethin obvious.

     

    This is my first App so i beg your pardon if I seem a bit dense 🙂

     

    H

  • strategery Profile Picture
    179 on at

    There are several ways to tackle what you are talking about I think.  If you like the idea of having blank by default but concerned with the data being saved as blank, there are ways to prevent that. An easy workaround, set the 'Visible' property of your submit form button to hide the button when the dropdown selection is 'blank'.

     

    Perhaps the best solution for data integrity is to properly set up the data source validation and use the 'Validate' function of PowerApps to validate any records before attempting to save them, see here:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-validate

     

    This would require the proper validation settings in the data source (i.e. the column set to not allow blanks, etc.).  I'm vaguely familiar with SharePoint lists, but it seems you can set up validation on a column in a list, and even provide an error message that is shown to the user when data doesn't validate. Once it's set up in SharePoint, using 'Validate' function in PowerApps will check the form fields and provide messages to the user when something isn't right.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi and thank you for your answer, and sorry for my responding late.

     

    I think I may not relate my issue in an understandable way.

     

    The thing is:

    The reason for me wanting to have blanks as default is that I do want my users to actually have to choose/type the data they submit. My validation works and is not an issue.

    I have a form that i want to use only for creating new items in my sharepoint list. Everything is working fine.. almost... My dropdown fields are troubblesome - I got two of them (The other fields are: two "type" fields and one attachment field - these resets just fine).

     

    After i submit my first form things looks fine. When I try to open my form again to make another item, my form resets all fields to my default (blanks), except for my two dropdown fields. These two fields retain values from my last input, no matter what I try, I do not really have to submit the form either, if I try to reset after just choosing a value - it stays forever.

     

    I have set the default FormMode.NEW for this form, and there is no default values from Sharepoint either. So there should not really be anything from outside powerapps to cause this behaviour.

     

    All the best

    Henrik

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 181 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 112 Super User 2026 Season 2

Last 30 days Overall leaderboard