Skip to main content

Notifications

Copilot Studio - Calling Actions from Copilot S...
Unanswered

why SQL query become json? how to parse json into string?

(0) ShareShare
ReportReport
Posted on by 28

Hi,

 

 

I am having difficulty with sql query when trying to implement in copilot studio, which part i did mistake on?

 

[1] simple SQL query result as below, i just want the "1" as result, no issue on SQL

zhengtzerlee_1-1715943150465.png

 

 

[2] on power automate, I execute the same query

zhengtzerlee_0-1715943059997.png

 

result is int, so i convert to string

zhengtzerlee_2-1715943263447.png

 

[3] when in copilot studio bot, it weirdly become json, Zzzzzz.. why

zhengtzerlee_3-1715943346386.png

 

may i know how to only getting the "1" in "changeLaptop" column?

i must have miss something, SQL query should be direct simple ><

 

thanks a lot

Lee

  • Re: why SQL query become json? how to parse json into string?

    Hi @zhengtzerlee ,

     

    Please try this

    string(body('execute...')?['ResultSets/Table1']?[0]?['changeLaptop'])

     

    Best Regards,

    Wearsky

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,475

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,767

Leaderboard

Featured topics