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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Search text box to sea...
Power Apps
Answered

Search text box to search for anything vs. startswith

(0) ShareShare
ReportReport
Posted on by 557

Below is in my items property for a gallery.  I am trying to make the SearchInput_tb.Text searchable by anything.  Right now I can only search for the title when it starts with something.  Any way for it match up to anything in that search box?  How could I alter below?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

With(
{
_prefiltered_data: Filter(
'eCom Intake',
Status.Value = "Open - Assigned",
Len(Dropdown4.Selected.Value) = 0 || LOB.Value = Dropdown4.Selected.Value,
Len(Dropdown4_1.Selected.Value) = 0 || 'Issue Type'.Value = Dropdown4_1.Selected.Value
)
},
With(
{
_filtered_by_names: Filter(
_prefiltered_data,
Len(SearchInput_tb.Text) = 0 || StartsWith(
Title,
SearchInput_tb.Text
) || StartsWith(
'Created By'.DisplayName,
Trim(SearchInput_tb.Text)
) || StartsWith(
AssignedTo.DisplayName,
Trim(SearchInput_tb.Text)
)
),
_filtered_by_id: Filter(
_prefiltered_data,
Len(SearchInput_tb.Text) = 0 || ID = Value(SearchInput_tb.Text)
)
},
With(
{
_finaltable: If(
!SearchID_tg.Checked && !SearchRequestor_tg.Checked,
_filtered_by_names,
_filtered_by_id
)
},
Sort(
_finaltable,
ID,
SortOrder.Ascending
)
)
)
)

Categories:
I have the same question (0)
  • Mitanshu Profile Picture
    1,658 Moderator on at

    You can use the "in" operator within Filter function of Power Apps

     

    Although you may want to check delegation for the "in" operator in relation to the datasource that you are using

     

    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 this post or my previous reply was useful in other ways, please consider giving it Thumbs Up.

  • Verified answer
    Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @joel914823 - you can use the below but note that unless you're using Dataverse, the Search function is not delegable.

     

    You can mitigate this somewhat by using the With function to "pre-filter" the list with a delegable functions, and then run the Search function on that filtered subset: 

     

    With(
     {
     _prefiltered_data: Filter(
     'eCom Intake',
     Status.Value = "Open - Assigned",
     Len(Dropdown4.Selected.Value) = 0 || LOB.Value = Dropdown4.Selected.Value,
     Len(Dropdown4_1.Selected.Value) = 0 || 'Issue Type'.Value = Dropdown4_1.Selected.Value
     )
     },
     With(
     {
     _transformed_data: AddColumns(
     _prefiltered_data,
     TextID,
     Text(ID),
     CreatedByDisplayName,
     'Created By'.DisplayName,
     AssignedToDisplayName,
     AssignedTo.DisplayName
     )
     },
     With(
     {
     _filtered_by_names: Search(
     _transformed_data,
     SearchInput_tb.Text,
     Title,
     CreatedByDisplayName,
     AssignedToDisplayName
     ),
     _filtered_by_id: Search(
     _transformed_data,
     SearchInput_tb.Text,
     TextID
     )
     },
     With(
     {
     _finaltable: If(
     !SearchID_tg.Checked && !SearchRequestor_tg.Checked,
     _filtered_by_names,
     _filtered_by_id
     )
     },
     Sort(
     _finaltable,
     ID,
     SortOrder.Ascending
     )
     )
     )
     )
    )
    

     

    Btw, I note you're using the solution I suggested in your other post, but did you not accept this solution?

     

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Search-Field-by-ID/m-p/2740059#M672545

  • Verified answer
    joel914823 Profile Picture
    557 on at

    apologies @Amik I could have sworn I hit accept as solution.  Thank you so much.  This worked as well! Thank you.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard