cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GiZmO
Frequent Visitor

Filter By Exact Number

Hello All

 

I am displaying a SharePoint list in PowerApps. I have created two search boxes to filter the results. 

The StartsWith function works great for the Title, however the filter results for Row_x0020_Number doesnt work for us.

 

If we filter "3" the results also show "31", "32" and so on.. If we search "3" we only want to display 3 not the others. 

 

SortByColumns(Filter('tree import', StartsWith(Title, TextSearchBox1.Text)&& StartsWith(Row_x0020_Number, TextSearchBox1_1.Text)), "Title", If(SortDescending1, Descending, Ascending))

 

Any help would be appreciated

1 ACCEPTED SOLUTION

Accepted Solutions
wyotim
Resident Rockstar
Resident Rockstar

I think the issue is in the StartsWith that you are using to compare Row_x0020_Number and TextSearchBox1_1.Text, which I believe is why you are getting items that start with 3.

 

Maybe try:

 

SortByColumns(
    Filter(
        'tree import', 
        StartsWith(Title, TextSearchBox1.Text) && 
            Row_x0020_Number = Value(TextSearchBox1_1.Text)
    ), 
    "Title", 
    If(SortDescending1, Descending, Ascending)
)

View solution in original post

3 REPLIES 3
wyotim
Resident Rockstar
Resident Rockstar

I think the issue is in the StartsWith that you are using to compare Row_x0020_Number and TextSearchBox1_1.Text, which I believe is why you are getting items that start with 3.

 

Maybe try:

 

SortByColumns(
    Filter(
        'tree import', 
        StartsWith(Title, TextSearchBox1.Text) && 
            Row_x0020_Number = Value(TextSearchBox1_1.Text)
    ), 
    "Title", 
    If(SortDescending1, Descending, Ascending)
)
GiZmO
Frequent Visitor

Thank you very much. That worked for me

wyotim
Resident Rockstar
Resident Rockstar

Happy to help out!

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (3,474)