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 / Searching for word ins...
Power Apps
Suggested Answer

Searching for word inside text (sharepoint list)

(1) ShareShare
ReportReport
Posted on by 111
Hi
 
I'm having trouble with this code. I want to search for the word written in TextInput1_9 within the 'Project' column, not just at the beginning of the text. I need to search for the word even if it's in the middle of the 'Project' text, so it should look for the full text match. 

If(IsBlank(TextInput1_9.Text),

SortByColumns(
    Filter(
        ‘Table1’,
        StartsWith(
           'Number',
            TextInput1_8.Text
        ) && (Status = status_13.Selected.Status || status_13.Selected.Status = Blank()) && (Name_3.Selected.Value = Blank() || NameColumn = Name_3.Selected.Value)
    ),
    "Title",
   SortOrder.Descending),
 

SortByColumns(
    Filter(
        ‘Table1’,
        StartsWith(
           'Number',
            TextInput1_8.Text
        ) && (

// here I want to search for word that written in TextInput1_9 to be searched in Project Column

         StartsWith(
           Project,
            TextInput1_9.Text
        )

        )
       
        && (Status = status_13.Selected.Status || status_13.Selected.Status = Blank()) && (Name_3.Selected.Value = Blank() || NameColumn = Name_3.Selected.Value)
    ),
    "Title",
SortOrder.Descending
 
)

)
 
Categories:
I have the same question (0)
  • Suggested answer
    Nandit Profile Picture
    1,568 Moderator on at
    Hi ASH3,
     
     
    Instead of StartsWith( Project, TextInput1_9.Text), assuming your Project Column values will have a space " " as delimiter, try this - 
     true in ForAll(
            Split(
                Project,
                " "
            ),
            ThisRecord.Value = TextInput1_9.Text
        )
     
    We are splitting your Project column values and then comparing each value with TextInput1_9.Text. Wherever it will be true, we are returning that item from the list. 

    Give it a try. 

    If this answers your query, please mark this response as the answer.
    If its helpful, please leave a like. Thanks!
  • Suggested answer
    RoyG Profile Picture
    31 Moderator on at
    If your list is not that large (less than 2K) you can set the delegation limit to 2000 and use the Search function instead of Filter in you Items expression. Unfortunately with large lists you'll hit the delegation limitation. You can either use Dataverse as datasource - which supports the In operator for the Filter function or use Power Automate to fetch the filtered items.
  • WarrenBelz Profile Picture
    153,117 Most Valuable Professional on at
    Hi ASH3
    The other option is to "pre-filter" with a Delegable query. Provided the top filter returns record numbers under your Data Row Limit, you will get all matching records for the Search at the bottom.
    With(
       {
          _Data:
          SortByColumns(
             Filter(
                'Table1',
                (
                   Len(TextInput1_8.Text) = 0 ||
                   StartsWith(
                      'Number',
                      TextInput1_8.Text
                   )
                ) && 
                (
                   Status = status_13.Selected.Status || 
                   Len(status_13.Selected.Status) = 0
                ) && 
                (
                   Len(Name_3.Selected.Value) = 0 || 
                   NameColumn = Name_3.Selected.Value
                )
             ),
             "Title",
             SortOrder.Descending
          )
       },
       Search(
          _Data,
          TextInput1_9,
          Project
       )
    )
     
    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee

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 765 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 272

Last 30 days Overall leaderboard