Skip to main content

Notifications

Calling Actions from Copilot Studio
Unanswered

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

Posted on by 21

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

Welcome to the Power Platform…

We are thrilled to unveil the newly-launched Power Platform Communities!…

Getting Started…

Welcome to the Power Platform Community! We appreciate your visit…

Welcome to the new Power Platform Community!…

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

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 138,287

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,172

Leaderboard

Featured topics