0

I am trying to search my field "Title" which contains a combination of string + numbers.

I.e. "Stack-1234" is a record in my field "Title".

Items in BrowseGallery1:

If(Toggle2.Value=false, SortByColumns(Filter([@'Documentation Tracker'],Lower(Requestor_two) = Lower(User().Email) Or Lower(Approver.Value) = Lower(User().Email) && StartsWith(Title, TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending)), SortByColumns(Filter([@'Documentation Tracker'], StartsWith(Title, TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending)))

However I see more then what I am searching, see below:

enter image description here

1 Answer 1

1

Try using this formula in items property of your gallery control:

If(
    Toggle2.Value = false,
    SortByColumns(
        Filter(
            [@'Documentation Tracker'],
            Or(Lower(Requestor_two) = Lower(User().Email), Lower(Approver.Value) = Lower(User().Email)) && StartsWith(Title, TextSearchBox1.Text)
        ),
        "Title",
        If(SortDescending1, Descending, Ascending)
    ),
    SortByColumns(
        Filter(
            [@'Documentation Tracker'],
            StartsWith(Title, TextSearchBox1.Text)
        ),
        "Title",
        If(SortDescending1, Descending, Ascending)
    )
)

Documentation: And, Or, and Not functions in Power Apps

Note: Sometimes filtering may happen when you click outside the text input control

2
  • Thanks !! One question, is there anyway to search for a portion of the "title" Ie. instead of searching CAATTS-2022-1234, is there a way to search 1234?
    – Jonnyboi
    Aug 10, 2022 at 13:11
  • 1
    Instead of StartsWith(Title, TextSearchBox1.Text), use TextSearchBox1.Text in Title. Aug 10, 2022 at 13:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.