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

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (4,286)