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 Automate / SQL query result not a...
Power Automate
Answered

SQL query result not accessible

(0) ShareShare
ReportReport
Posted on by 12

Hi all,

 

I have a SQL connection. For testing purposes, it retrieves one line from a table. The output is stored in DataTable called 'QueryResult'.

MarcDussault_0-1710968373270.png

It is 1 row, 70 columns, of which a sample is displayed above.

 

MarcDussault_3-1710969230467.png

 

Let's say I want to extract 'Code' and set it into a variable. From what I gather, the 'Set Variable' syntax should be: %QueryResult[0][2]% (first row, 3rd column), or alternatively %QueryResult[0]['code']%, thus:

MarcDussault_2-1710968622664.png

 

When run however, I only get the text representation of the query. As though I simply want to set the variable equal to the above string, as per below:

MarcDussault_4-1710969264065.png

 

 

What am I doing wrong?

 

I have the same question (0)
  • Verified answer
    Deenuji_Loganathan_ Profile Picture
    6,255 Moderator on at

    @MarcDussault 

     

    It appears you've constructed your workflow with Power FX enabled. Please generate a new workflow with Power FX disabled and attempt the same syntax.

     
     
     
     

    Powerfx.png


    For reading datatable values in a Power FX enabled workflow, kindly refer to the syntax provided below.

    Powerfx readcell.png

     

    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀. If you'd like to appreciate me, please write a LinkedIn recommendation 🙏
     
  • MarcDussault Profile Picture
    12 on at

    Beauty - many thanks.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 470

#2
Haque Profile Picture

Haque 416

#3
David_MA Profile Picture

David_MA 344 Super User 2026 Season 1

Last 30 days Overall leaderboard