cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Stijn007
Advocate III
Advocate III

Filter Gallery on a value that starts with multiple choice values

Hello,

 

 

I have a sharepoint list, lets name it "Staff",  with a choice column named "Knowledge". 

in the choice column "Knowledge"  I have values like TCC1, TCC2, TCC3 ,   OCC1 , OCC2, OCC3 

Is it possible to filter a gallery based on a value , for example TCC,  and get all the records where the value in the knwoledge column starts with TCC? 

 

so in a dropdown,  i added manually all values of the choice column and added "TCC" and "OCC" 

When the uer selects TCC , all records where the knowledge starts with TCC , should be in the list. 

 

Is this possible? 

3 REPLIES 3
TheRobRush
Super User
Super User

Pretending the table name is sampletable and the value it should start with is "App" in the Name column

 

Filter(SampleTable,StartsWith(Name,"App")=true)

 

replace smapletable with your collection, and name with your columnn name then "App" with the dropdown.selected.value ( play with this dropdown code in a text label box first to make sure you get the syntax correct to save you a headache)

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

Hello,

 

I still get an error that StartsWith expect a text value and the column in my sharepointlist is a choice column and not text. 

I guess that's why he gives the error. 

I already tried to put the table  in a collection but the error remains. 

 

 

TheRobRush
Super User
Super User

See below

Filter(ParkingMasterGarages, ComboBox1.Selected.Name in Area.Value)

ParkingMasterGarages is the Source List

ComboBox1 is where I make my selection

Area is the choice column, and .Value is the choices location in that column

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,019)