cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mssss
Helper V
Helper V

Filter Choices with startswith ?

Hello,

 

Is it possible to filter Choices using "startswith"?? all data is in CDS(Dataverse)

 

I have a combo box selection with number like following (multi selection).

100_categoryA

200_categoryB

300_categoryC

 

When I chose "200_categoryB" I would like to show item start with 200-299 in next combo box.

201_item1

202_item2

 

I've tried  arranging following but did not work how I would like to do.

Filter(Choices(products),"2" in Value)

2 ACCEPTED SOLUTIONS

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @mssss :

Please try this formula:

Filter(Choices(YourTable.ChoiceColumn),"2" in Text(Value))

Or

Filter(Choices(YourTable.ChoiceColumn),StartsWith(Text(Value),"2"))

Best Regards,

Bof

 

View solution in original post

VijayTailor
Resident Rockstar
Resident Rockstar

HI @mssss ,

Please Find the Solution for your Problem below - 
See the Data Structure-

VijayTailor_0-1613546405086.png

So First ComboBoxCode Like below - 

CateSource //Source

Second Combo Box Filter Code.

Filter(ItemSource,StartsWith(CateName,First(Split(ComboBox1.Selected.CateName,"_").Result).Result))

Please Find the Demo for the Same.
Sorting_FilteringComboCascading.gif

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."-Vijay





View solution in original post

3 REPLIES 3
v-bofeng-msft
Community Support
Community Support

Hi @mssss :

Please try this formula:

Filter(Choices(YourTable.ChoiceColumn),"2" in Text(Value))

Or

Filter(Choices(YourTable.ChoiceColumn),StartsWith(Text(Value),"2"))

Best Regards,

Bof

 

VijayTailor
Resident Rockstar
Resident Rockstar

HI @mssss ,

Please Find the Solution for your Problem below - 
See the Data Structure-

VijayTailor_0-1613546405086.png

So First ComboBoxCode Like below - 

CateSource //Source

Second Combo Box Filter Code.

Filter(ItemSource,StartsWith(CateName,First(Split(ComboBox1.Selected.CateName,"_").Result).Result))

Please Find the Demo for the Same.
Sorting_FilteringComboCascading.gif

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."-Vijay





@v-bofeng-msft 

@VijayTailor 

Thank you ! worked😉

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,924)