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 / Default Dropdown Value...
Power Apps
Answered

Default Dropdown Value Not Working?

(0) ShareShare
ReportReport
Posted on by 23

Hi all,

 

I've previously been using a workaround that I found on this forum to set a default value for a dropdown based on a variable which is storing a text value (found here)

 

If(SharePointForm1.Mode = New, {
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
	Value:"Blue"}, 
ThisItem.FavoriteColor)

 

This has all of a sudden stopped passing this value off to my SharePoint list when saving. It still displays the expected value in my PowerApp, but doesn't actually use it when saving the item.

 

I have noticed there is a semi-new "Combo Box" dropdown item which can be used in a form, but this odata-type workaround does not work in it. Instead, I can set the "DefaultSelectedItems" control to my intended value which appears to work in the app, but again when saving it doesn't actually pass it through to the SharePoint record.

 

Is there a new definitive way to set a default value for a dropdown?

Categories:
  • RusselThomas Profile Picture
    4,014 on at

    Hi afoti,

     

    Are you using a form with the SubmitForm() function, or a Patch() function to update SPO?

    If the former, can you confirm what your Update: property value of the card holding the dropdown is?

    If the latter, or some other method, can you include the formula you're using and perhaps some screenshots?

     

    Kind regards,

     

    RT

  • afoti Profile Picture
    23 on at

    Hi Russel,

     

    I'm using the SubmitForm() function. 

     

    The Update property on the card reads as "Dropdown.Selected".

     

    Thanks,
    Andrew

  • RusselThomas Profile Picture
    4,014 on at

    Hi Andrew,

     

    Not sure what's happening on your side - seems to be working on my side, maybe I'm doing something different to what you've explained...

     

    If the SharePoint choice column you're referring to has a Default set on the column settings, then not having a value for this field will result in the default being applied to the new row of data.

    If you set the default on the card to a colour other than the column default, then the card default gets saved.

     

    I created a choice column called Colours in SPO with three colour choices and loaded an Edit form and set it's default mode to New.

    I set the Default value of the card to 

    If(Form1.Mode=New, {
    '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Value:"Red"}, ThisItem.Colours)

    I then set the choice control Default property to Default.Parent

     

    If I reset the form and submit, it saves the Red value to the list.  If I set the value to something else, it saves that value.

    So I'm not sure what, if anything, is different here...

    choicedefault.PNG

     

    Are you perhaps using a different control for the choices column?

     

    Kind regards,


    RT

     

     

  • RusselThomas Profile Picture
    4,014 on at

    Hi Andrew,

     

    Not sure what's happening on your side - seems to be working on my side, maybe I'm doing something different to what you've explained...

     

    If the SharePoint choice column you're referring to has a Default set on the column settings, then not having a value for this field will result in the default being applied to the new row of data.

    If you set the default on the card to a colour other than the column default, then the card default gets saved.

     

    I created a choice column called Colours in SPO with three colour choices and loaded an Edit form and set it's default mode to New.

    I set the Default value of the card to 

    If(Form1.Mode=New, {
    '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Value:"Red"}, ThisItem.Colours)

    I then set the choice control Default property to Default.Parent

     

    If I reset the form and submit, it saves the Red value to the list.  If I set the value to something else, it saves that value.

    So I'm not sure what, if anything, is different here...

    choicedefault.PNG

     

    Are you perhaps using a different control for the choices column?

     

    Kind regards,


    RT

     

     

  • afoti Profile Picture
    23 on at

    Hi Russel,

     

    Thanks for your assistance with this. Now I think about it, the difference might be that my dropdown is referencing a "Lookup" column (which is in turn referencing another SharePoint list) instead of a standard "Choice" column. Do you know if it is supposed to work with a "Lookup" column or if there is another method I could use?

     

    Thanks,

    Andrew

  • Verified answer
    RusselThomas Profile Picture
    4,014 on at

    Hi Andrew,

     

    Check out this blog by Carlos Figuera, there is a section for Lookup column defaults.

    Herewith the excerpt, but give the blog a read, it's great for various complex column types;

     

    Lookup columns

    Those are columns for which the user can select a value from another table. This time, using the value only is not enough - it's possible that there are multiple items in the table that is being looked up that have the same value for the referenced column, so we also need to specify the Id property of those values. The best way to retrieve it is to use the Choices function, which returns both the referenced column in the lookup, as well as the identifier of the value. So if you have a column named 'Department' of type lookup to another list 'Departments', and we know that the value that you want to use as the default is 'Sales', we can use a LookUp function if the column only allows single selection:

    If(
     EditForm1.Mode = FormMode.New,
     LookUp(
     Choices(MyListName.Department),
     Value = "Sales"),
     Parent.Default)

    Likewise, if the column supports multiple selection, then you'd use a Filter expression on the possible choices to define the default selected values:

    If(
     EditForm1.Mode = FormMode.New,
     Filter(
     Choices(MyListName.RelatedDepartments),
     Value = "Sales" Or Value = "Human Resources"),
     Parent.Default)

     

    Hope this helps 🙂

     

     

    RT

  • afoti Profile Picture
    23 on at

    Worked perfectly, thanks heaps for your help Russel Smiley Happy

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard