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 empty ...
Power Apps
Unanswered

set dropdown to empty (allow empty selection is set to true) when the items are [true,false]

(0) ShareShare
ReportReport
Posted on by 678

I have a dropdown containing true and false and I want to reset the value to blank.


Dropdown:
The items are boolean values.

Items: [true,false]
Default: defaultPaxOnBoard

Allow empty selection is set to true.

On the Home screen before navigating to the page with the dropdown I thought it would be as simple as this...

Set(defaultPaxOnBoard,"");

Set(defaultPaxOnBoard,true);

Set(defaultPaxOnBoard,false);


None, of these work. The items is a manually typed value and not a SP List.

 

 

 

Categories:
I have the same question (0)
  • SaiKrishnaGudluru Profile Picture
    499 on at

    try this

    items =[' ', true,false]

    DefaultSelectedItem = ' '

  • sasrsc Profile Picture
    678 on at

    Sort of. That does appear to fix the issue with 1 of my 3 dropdowns defaulting those but just with the text items.
    Items: ["","Yes","No"]

    Both the defaulting works and my filtering using the dropdown values in this object.

    My issue remains with the 2 dropdowns that contain currently a true/false

    Items: ['',true,false] - it barks at me for that...

    sasrsc_0-1602219709580.png

    So I tried ["",true,false] and it accepted it in the dropdown.

    sasrsc_1-1602219739914.png

    That works with the setting of the default dropdown value BUT now my previous filter on the gallery doesn't work and I'm not sure how to fix it...

    The filter "extract" here...

    sasrsc_2-1602219900686.png

    reportingSAS is a boolean...
    DdReportingSAS is now (I believe) treated as Text because of my adding the "" into the items declaration so then it doesn't matter whether I change it to blank, false or true it will never equal the reportingSAS value as that's a boolean true/false whereas the dropdown (I think) is being converted to a text string now and no rows appear.

  • sasrsc Profile Picture
    678 on at

    OK, this is bizarre...

    In the 2 dropdowns that were ["",true,false]

    I changed those back to boolean [true,false] but I still have the allow empty values.

    The defaulting seems to be sporadically working now even though I didn't change my set values.

    (I did erase the filter statement and did it from scratch again)

    I know PA can be finicky.

     

    I then changed the text dropdown back to items: ["Yes","No"] and all the filtering seems to be working again.

    But the defaulting of the dropdowns is hit and miss. I need to better isolate this to get everyone's help as it seems like it depends what the previous value was as to whether the defaulting is working... 

    Sorry...for not being clearer.... 


    Refresh(ComplianceApproval);Refresh(CompliancePassengers);Refresh(ComplianceTrips);
    Set(defaultComplianceStatus,""); /* this always works for setting the default the items are ["Approved","Approved (Blanket)", "Not Started","Pending","Rejected"] */
    Set(defaultReportingRequired,""); /* this seems to work the items are ["No","Yes"] */
    Set(defaultReportingRequiredSAS,false);  /* this seems to work the items are ["No","Yes"] */
    Set(defaultPaxOnBoard,true); /* this doesn't seem to work for defaulting [true,false] */

    I even show a label for defaultPaxOnBoard so I know it's set to true...

    But the dropdown won't go to the correct item as the default

     

    This really doesn't make any sense 

     
     

     

     

     

     

     

     

  • mitch81 Profile Picture
    2 on at

    In YourDropdown set:

    Items: ["true","false"]

    AllowEmptySelection: True

     

    Create a button and set it's OnSelect property to Reset(YourDropdown). Once you click on the button, there will be no item (true or false) selected.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 491

#2
WarrenBelz Profile Picture

WarrenBelz 407 Most Valuable Professional

#3
11manish Profile Picture

11manish 331

Last 30 days Overall leaderboard