Skip to main content

Notifications

Announcements

No record found.

Calling Actions from Copilot Studio
Unanswered

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

Posted on by

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

Helpful resources

Quick Links

Exciting News for Copilot Studio Communi…

Get ready to experience a whole new level of engagement with the Copilot Studio…

Celebrating the May Super User of the…

LaurensM is an exceptional contributor to the Power Platform Community…

Check out the Copilot Studio Cookbook…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
renatoromao Profile Picture

renatoromao 6,459

#2
Pstork1 Profile Picture

Pstork1 1,954

#3
Expiscornovus Profile Picture

Expiscornovus 1,648

Featured topics