web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter Text and number...
Power Apps
Unanswered

Filter Text and number columns at the same time

(0) ShareShare
ReportReport
Posted on by 26

Hello guys,

 

I am struggling to get this one working. I have already searched a lot but cannot find the solution. This is the code I have right now in the "Items" of a gallery:

 

 

Filter(
 SPList,
 Or(
 StartsWith(
 Title,
 txtInputInvSearchBar.Text
 ),
 StartsWith(
 'Group No.',
 txtInputInvSearchBar.Text
 ),
 'Invoice Amount' = Value(txtInputInvSearchBar.Text)
 ) And (StartsWith(
 'Group Administrator'.DisplayName,
 txtInputUserFilterInv.Text
 ) And 'Amount Received' = Blank() And 'Revised Invoice' = false)
)

 

I am trying to filter the gallery based on the information entered in an input text box.

The idea is that the user can filter by "Invoice No" OR "Group No" OR "Amount". The first two columns are text and the last one is a number. 

Right now, my code only displays results where the text entered into the input text box has an exact match with the amount. However, if I start typing "T", which is the first letter of one of my invoices, the gallery displays no records.
I don't understand what I am doing wrong, if the conditions are in an OR statement, the system should display info because the "T" in the input text matches one of the OR statements.

Extra info:
- Data source is a SharePoint list

- Delegation must be taken into consideration as I have more than 2,000 records

- I tried a workaround where I created a separated input text box to handle only the "Amount" filter condition, and adding an AND statement. It works, but I would really prefer to avoid this route, if possible, to enhance the user experience.


Your help would be really appreciated. 

Thank you 🙂 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    HI @faamaya ,

    You also have another filter on the group administrator and I don't know whether this is And or Or, but try this for a start so you can see the bracketing a bit better

    Filter(
     SPList,
     (
     StartsWith(
     Title,
     txtInputInvSearchBar.Text
     ) ||
     StartsWith(
     'Group No.',
     txtInputInvSearchBar.Text
     ) ||
     (
     Len(txtInputInvSearchBar.Text) = 0 ||
     'Invoice Amount' = Value(txtInputInvSearchBar.Text)
     ) ||
     StartsWith(
     'Group Administrator'.DisplayName,
     txtInputUserFilterInv.Text
     )
     ) && 
     'Amount Received' = Blank() && 
     'Revised Invoice' = false
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • faamaya Profile Picture
    26 on at

    Hi @WarrenBelz 

    Thank you for your reply. However, this didn't work either.
    I only get results if I get an exact match with the amount column, which shouldn't be, it should allow me to filter for that OR the start of any of my group No. or Invoice No.
    Also, the filter of the group administrator is an AND and it works with a separate text input control.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard