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 / Combobox lists filter ...
Power Apps
Answered

Combobox lists filter by Active (Sharepoint List Column Value)

(3) ShareShare
ReportReport
Posted on by 96
Hi,
 
Wondering for any help/advice.
(I am using Canvas Apps not a Form.
 
I have a Sharepoint List called : Venue List
There are 2 columns in the List : Venue and Active
 
I have a combobox "cmbVenue" which has this fx code in it's "item" setting
 
Sort(Distinct(Filter('Venue List',StartsWith(Venue,Self.SearchText)),Venue),Value)
 
which does show all items in the Venue List sharepoint list.
 
But what i want is to only show items where the Active column (in the sharepoint list) is equal Yes and hide items that are not active (Active column - No)
 
Please can someone suggest how to adapt my fx code in its "item" setting to facilitate this.
 
Thanks in advance.
 
 
I have the same question (0)
  • Suggested answer
    timl Profile Picture
    37,214 Super User 2026 Season 1 on at
     
    You can do this by extending your call to Filter to include the active column.
     
    The code would look like this:
     
    Sort(
        Distinct(
            Filter(
                'Venue List',
                Active = true,
                StartsWith(Venue, Self.SearchText)
            ),
            Venue
        ),
        Value
    )
     
  • CU10041356-0 Profile Picture
    96 on at
    Hi,
    Many thanks for replying.
     
    I get an error message - "Incompatible typesfor comparison. These types can't be compared: Text, Boolean"
     
    The Active column in the sharepoint List  "Venue List", is not a yes/no field(boolean) it is a plain text column. So the values are strings "Yes" or "No".
     
    Do you know how i would make it work with Strings NOT boolean, but also with avoiding Delegation Issues.
     
    Thanks again!
     
  • Verified answer
    timl Profile Picture
    37,214 Super User 2026 Season 1 on at
     
    Changing the syntax of the condition to 'Active = "Yes"' will treat it as a string rather than a boolean. 
     
    Sort(
        Distinct(
            Filter(
                'Venue List',
                Active = "Yes",
                StartsWith(Venue, Self.SearchText)
            ),
            Venue
        ),
        Value
    )
     
    The issue is that Distinct isn't delegable. If you try grouping by Venue instead, that should give you a distinct list that's delegable.
     
     
    Sort(
        GroupBy(
            Filter(
                'Venue List',
                Active = "Yes",
                StartsWith(Venue, Self.SearchText)
            ),
            Venue,
            GroupData
        ),
        Venue
    )
     
  • CU10041356-0 Profile Picture
    96 on at
    Many thanks that works.
     
    Just asking your advice, would i be better to stick to a Boolean for "Active" or a string?
    Obviously, delegation in mind.
     
    Thank you
  • Verified answer
    Haque Profile Picture
    3,653 on at
    Hi @CU10041356-0,
     
    venues : Active = Yes
    In ComboBox cmbVenue, let's update Items property formula to include a filter on the Active column like this:
     
    Sort(
        Distinct(
            Filter(
                'Venue List',
                StartsWith(Venue, Self.SearchText) && Active = "Yes"
            ),
            Venue
        ),
        Value
    )
     

    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!
  • CU10041356-0 Profile Picture
    96 on at
     that is awesome.
     
    Thank you so much - that also works exactly as i was looking for.
     
    It is much appreciated.
     
  • timl Profile Picture
    37,214 Super User 2026 Season 1 on at
     
    >>Just asking your advice, would i be better to stick to a Boolean for "Active" or a string?
     
    In answer to this question, a Boolean would probably be better. Both strings and Booleans are delegable, so it makes no difference from a delegation perspective.
     
    The benefit of a string is that it would provide more flexibility if you want to add additional options over yes/no at a future date (ie pending, deleted, etc). 
  • Suggested answer
    Haque Profile Picture
    3,653 on at
    Hi - depends,
     
    Boolean is better from comutational POV in contrast string is always expensive. If you don't foresee any any addition of options in future, you can pick up boolean one, string otherwise.

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 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard