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 / ParsJSON does not work
Power Apps
Unanswered

ParsJSON does not work

(0) ShareShare
ReportReport
Posted on by 35

Hello,

 

I am creating an app for searching in sharepoint libraries. However, when I put the code: Table(ParseJSON(varSearchResults.searchresults))

 

I get an error message, but I cannot seem to locate the error?

Amalie1_0-1696936907920.png

Best,

Amalie

Categories:
  • MarkRahn Profile Picture
    1,424 Super User 2026 Season 2 on at

    Hi @Amalie1 ,

     

    Your could start to debug this by outputting the value varSearchResults.searchresults to another control such as a Text Label to see what is coming back. You can also look at the variable contents to see what it contains:

    MarkBandR_0-1696942078234.png

    You need to validate that the value of varSearchResults.searchresults is JSON.

     

    What are you using to search the sharepoint libraries that is returning results as JSON?

     

    -Mark

  • Amalie1 Profile Picture
    35 on at

    Hi Mark,

     

    Thank you for your reply. I am not quite sure what I am using to search with that returns JSON, as I have been following a video guide which does everything I want my flow to do.

    🔎 Search File Content 📃 in Power Apps from SharePoint Document Libraries - YouTube

    (it is at 20:00 he puts the ParsJSON in)

    So, I have just followed the steps blindly, so I'm not sure what or why I have done it, as I am still quite new in power automate.

     

    - Amalie

  • MarkRahn Profile Picture
    1,424 Super User 2026 Season 2 on at

    Hi @Amalie1 

     

    If you are going to learn Power Apps and Power Automate, you could not ask for a better teacher than Reza and his YouTube channel.

     

    Let me take a look at the video and get back to you.

     

    -Mark

  • MarkRahn Profile Picture
    1,424 Super User 2026 Season 2 on at

    Hi @Amalie1 

     

    When you look at the Power Automate Flow for "Search Documents" and you look at the Runs, what do you see?

    Are there any results?

     

    This shows no results:

    MarkBandR_0-1696948955322.png

    Or does it look like this with Results?

    MarkBandR_1-1696949032096.png

    The example you are looking at is pretty complicated as far as what it is accomplishing.

     

    The formula you have in the Power App is what the video shows. You need to check your Power Automate Flow to ensure it is working correctly.

     

    I was not able to get the "Path" part of the SharePoint Search REST API to work correctly, but that may just be me. I I simplified the Uri in the "Send an HTTP request to SharePoint" to:

    /_api/search/query?querytext=%27*%27

    where "*" was the Search Text I was passing to at least get results.

     

    From Reza's video, click the "...more" link to additional information:

    MarkBandR_2-1696949435202.png

    Here shows the formulas to use. You can also subscribe to his channel for a fee and get the complete source code (if needed).

     

    -Mark

    If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

  • Amalie1 Profile Picture
    35 on at

    Hi Mark,

    Thank you for taking the time to help me. I am on vacation until next Monday, where I will have a look at it and get back to you😊

    -Amalie

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Amalie1 ,

     

    If you want to return a table form a flow to your app, please try the response action. You can get a table directly in your app by this action:

    vbofengmsft_0-1697510739467.png

    I think these links will help you a lot:

    https://www.youtube.com/watch?v=hcMruU_ME_c

    https://softchief.com/2022/07/02/return-table-from-power-automate-to-canvas-app-using-response-action/

     

    In addition ,If you insist on using the ParseJSON function in canvas app, then you need to use the correct syntax:

    https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-parsejson

     

    Best Regards,
    Bof

     

  • Amalie1 Profile Picture
    35 on at

    Hi @MarkBandR ,

     

    I get the results from the first photo you attached, so no results.

    My flow says it runs successfully up until this point, but I'm not sure if my uri is correct. As I search for keywords I know is in the library, but no results show. 

    Amalie1_0-1697539869860.png

     

    -Amalie

  • Amalie1 Profile Picture
    35 on at

    Hi @v-bofeng-msft 

     

    Thank you for taking the time to reply. However, after watching the video I am not sure I can use this as it doesn't seem like it is was I'm trying to do, I don't know where I would get all of his inputs from.

     

    - Amalie

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
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard