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 / Set dropdown to blank ...
Power Apps
Answered

Set dropdown to blank by default

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I've created a dropdown list

 

Items forumula:

 

Filter('OneEng Candidates', cr818_OneEngEvent.cr818_oneengeventid = DropdownEvent.Selected.cr818_oneengeventid)

 

 

I set the default value to the dropdown as: "" or "test" but it still keeps showing as the first item in the Items formula filter

 

Why is that? Does the formula override the Default? Do I need to save the app and reload?

 

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    mdevaney Profile Picture
    29,991 Moderator on at

    @morall 
    I can help you with this 🙂

    You'll have to create a collection in the and add a blank option.  Do this by creating a collection.

    You'll probably need to create the collection in 2 places: OnVisible property of the app and the OnChange property of DropdownEvent.

    ClearCollect(colDropdownOptions, {your_column_name: Blank()});
    Collect(colDropdownOptions, Filter('OneEng Candidates', cr818_OneEngEvent.cr818_oneengeventid = DropdownEvent.Selected.cr818_oneengeventid).your_column_name;

     

    Then refer to the collection in the Items property of your dropdown.

    colDropdownOptions

     

    A similar concept is shown in this example:

    https://matthewdevaney.com/powerapps-collections-cookbook/unique-values-from-a-collection-with-a-blank-at-the-top/

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

     

  • morall Profile Picture
    Microsoft Employee on at

    Just out of curiosity, the default is meant to select the default item from the list, not necessarily add create new items? 

  • mdevaney Profile Picture
    29,991 Moderator on at

    @morall 

    Yes, that's correct.  Your observation is the reason why we cannot default to blank if its not already within the dropdown items as an option.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • morall Profile Picture
    Microsoft Employee on at

    I threw this in App and ran Run On Start:

     

    ClearCollect(colDropdownOptions, {Name: "Morgan"});
    Collect(colDropdownOptions, Filter('OneEng Candidates', cr818_OneEngEvent.cr818_oneengeventid = DropdownEvent.Selected.cr818_oneengeventid).Name;

     

    But only "Morgan" is showing up. I would have expected it to "combine" Morgan with the rest of the options. Can you see what I'm doing wrong  

  • morall Profile Picture
    Microsoft Employee on at

    Was missing a ")"

  • morall Profile Picture
    Microsoft Employee on at

    This is causing an error now on my Patch when trying to update an entity with the values in the dropdown menus:

    The Patch code on a Button

     

    ForAll(
     Gallery4.AllItems,
     Patch(
     'OneEng Candidates_Interviewers',
     Defaults('OneEng Candidates_Interviewers'),
     {
     Candidate: Slot1.Selected,
     Interviewer: Interviewer,
     IVSlot: Value(Label_Slot1.Text),
     Event: DropdownEvent.Selected,
     MorningOrAfternoon:drpdownMorA.Selected.Value
     }
     )
    );
    
    ForAll(
     Gallery4.AllItems,
     Patch(
     'OneEng Candidates_Interviewers',
     Defaults('OneEng Candidates_Interviewers'),
     {
     Candidate: Slot1.Selected,
     Interviewer: Interviewer,
     IVSlot: Value(Label_Slot2.Text),
     Event: DropdownEvent.Selected,
     MorningOrAfternoon:drpdownMorA.Selected.Value
     }
     )
    );

     

     

    "Invalid Argument type. Expecting a record value, but of a different schema."

     

    Is this because previously it was looking at records in the dropdown, but now it's looking at a collection?

    The table I'm patching this into is expecting a record value and it seems when I create a collection, it strips away the record value. Is there a way to handle this?

  • morall Profile Picture
    Microsoft Employee on at

    as a hack, not sure if there is a better way to do this:

     

     

     

    Candidate: First(Filter('OneEng Candidates', Name = Slot1.Selected.Name)) 

     

     

     

    The collection is returning a name, and I am trying to use that name as a filter on the 'OneEng Candidates' table, (the one I started with), and return the first record 

     

     

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 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard