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 Keywords in Doc...
Power Apps
Unanswered

Search Keywords in Documents in SharePoint

(1) ShareShare
ReportReport
Posted on by 6
Hi, I am currently creating a power app to search policy documents in SharePoint. I am able to search the documents name using the below code:
If(
    (IsBlank(Dropdown3.Selected.Value)),
    Search(
        Filter(
            Documents,
            !IsFolder
        ),
        TextInput2_1.Text,
        Name,
        'Link to item',
        Title
    ),
    With(
        {
            _Data: Filter(
                Documents,
                'Type of Policy'.Value = Dropdown3.Selected.Value
            )
        },
        Search(
            Filter(
                _Data,
                !IsFolder
            ),
            TextInput2_1.Text,
            Name,
            'Link to item',
            Title
        )
    )
)
 
To search through the documents for keywords, I have to create a power automation flow. The flow works correctly alone in a gallery when I put
Table(ParseJSON(varSearchResults.searchresults))
 
 
I want to add the above line to my if statement so it can search the document name and for keywords but when I add it to my filter line, it does not look for keywords. It still only search the name. The code I am trying to use is below:
If(
    (IsBlank(Dropdown3.Selected.Value)),
    Search(
        Filter(
            Documents,
            !IsFolder, ParseJSON(varSearchResults.searchresults)
        ),
        TextInput2_1.Text,
        Name,
        'Link to item',
        Title
    ),
    With(
        {
            _Data: Filter(
                Documents,
                'Type of Policy'.Value = Dropdown3.Selected.Value
            )
        },
        Search(
            Filter(
                _Data,
                !IsFolder,ParseJSON(varSearchResults.searchresults)
            ),
            TextInput2_1.Text,
            Name,
            'Link to item',
            Title
        )
    )
)
Categories:
I have the same question (0)
  • Nandit Profile Picture
    1,568 Moderator on at
     
    What's the output of your Power Automate flow? What's in varSearchResults.searchresults? Does it contain names of the Documents which have your Search text?
     
    Kind regards, 
    Nandit
     
     
  • CU17101829-0 Profile Picture
    6 on at
    Hi Nandit
     
    varSearchResults.searchresults Searching keywords in each document on Sharepoint. I’ll type a word in a text box in power apps and the Gallery or table will display results that have that word you searched for. It works when i run the flow on its own but not when i try to display results in a table and put it in an if statement. 

    Here is a screenshot of the flow:

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard