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)
)

View solution in original post

GiZmO
Frequent Visitor

Thank you very much. That worked for me

wyotim
Resident Rockstar
Resident Rockstar

Happy to help out!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (40,740)