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 / Customise 'True/False'...
Power Apps
Answered

Customise 'True/False' options in drop down

(0) ShareShare
ReportReport
Posted on by 20

Hi there,

 

Relatively simple one I think, but how can I change the options in my dropdown (which is linked to a Yes/No sharepoint list column) to my own customised wording instead of 'true' and 'false'?

 

JT Carpentry Job Tracker is the sharepoint data source

JobCompleted is the Column Name. I'd like for True to be represented in the drop down as "Job Completed" and False to be represented as "Job Open".

BAER_Group_0-1690748715824.png

 

Further, once this is done is there a way I can add a new option to the drop down filter called 'All Jobs' - that will show all the records (both 'true' and 'false' from the sharepoint column)?

The dropdown is being used to filter a gallery.

 

Many thanks!

Categories:
I have the same question (0)
  • EddieE Profile Picture
    4,650 Moderator on at

    @BAER_Group 

    This is a little tricky but think this should do it for you. I referenced a great video by @RandyHayes to build this, where he demo's how to add a dynamic "All" to dropdowns.

     

    For your dropdown, add this code 

    With(
     {
     wChoices: Sort(Distinct('JT Carpentry Job Tracker', JobCompleted), Value)
     },
     ForAll(
     Sequence(CountRows(wChoices)+1) As _count, 
     {
     Value: Switch( _count.Value,
     1, "All Jobs",
     2, "Job Open",
     3, "Job Completed"
     )
     }
     )
    )

     

    Then, you need to adjust your gallery Filter to include and/or be this,

    Filter(
     'JT Carpentry Job Tracker',
     
     ddYesNo.Selected.Value = "All Jobs" || 
     JobCompleted = Switch( ddYesNo.Selected.Value,
     "Job Completed", true,
     "Job Open", false
     )
    )

     

    Change ddYesNo to the name of yourDropdown

  • BAER_Group Profile Picture
    20 on at

    Thanks very much Eddie!

     

    The first part worked a treat. The drop down list now says All Jobs, Job Open and Job Completed. Thanks again.

     

    However the Gallery Items aspect returns error messages. The code is pictured below, the name of my dropdown is JobDropDown. Perhaps it's because I'm also running a separate filter using a search bar?

     

    BAER_Group_0-1690757601724.png

     

    Thank you

  • EddieE Profile Picture
    4,650 Moderator on at

    @BAER_Group 

    Yes, you need to combine the two Filters. Chaining them together like you have doesn't work.

     

    If you use the code window (</> symbol) to drop your code into, or simply copy & paste your code in a reply, I'll have a go at re-writing it for you

  • BAER_Group Profile Picture
    20 on at

    That would be much appreciated.

     

    SortByColumns(Filter([@'JT Carpentry Job Tracker'], StartsWith(Title, TextSearchBox1.Text)), "CustomerName", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending));
    Filter('JT Carpentry Job Tracker', JobDropDown.Selected.Value = "All Jobs" || JobCompleted = Switch( JobDropDown.Selected.Value, "Job Completed", true, "Job Open", false ) )

     

    Thanks again

  • Verified answer
    EddieE Profile Picture
    4,650 Moderator on at

    @BAER_Group 

    Thanks for that, try this

    SortByColumns(
     Filter(
     [@'JT Carpentry Job Tracker'], 
     ( IsBlank(TextSearchBox1) || StartsWith(Title, TextSearchBox1.Text)), 
     ddYesNo.Selected.Value = "All Jobs" || 
     JobCompleted = Switch( JobDropDown.Selected.Value, "Job Completed", true, "Job Open", false)
     ),
     "CustomerName", 
     If(SortDescending1, SortOrder.Descending, SortOrder.Ascending)
    )
    
    
    
     

     

     

  • BAER_Group Profile Picture
    20 on at

    Thanks Eddie. 

     

    It's not returned any results in the gallery unfortunately.

    The error message is as follows:

    BAER_Group_0-1690845628512.pngBAER_Group_1-1690845646664.png

    Thank you

  • Verified answer
    EddieE Profile Picture
    4,650 Moderator on at

    @BAER_Group 

    Can you share a screenshot of where in the formula this error is occurring? I also noticed I left my dropdown name in the above formula, but I'm guessing you found and fixed that?

  • BAER_Group Profile Picture
    20 on at

    That was it! I failed to change the dropdown name to mine!

     

    Thanks ever so much. I've marked the solution as resolved 🙂

  • EddieE Profile Picture
    4,650 Moderator on at

    Glad you got it sorted mate, happy to help 🙂

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

#2
11manish Profile Picture

11manish 191 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 122 Super User 2026 Season 2

Last 30 days Overall leaderboard