web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Using query with on-pr...
Power Automate
Unanswered

Using query with on-premise gateway

(1) ShareShare
ReportReport
Posted on by 54
I am getting an error just clicking in the query section when using an on-premise gateway.  How or where do construct a query in Power Automate to send the information back to Power Apps?
Categories:
I have the same question (0)
  • Verified answer
    Michael E. Gernaey Profile Picture
    53,335 Super User 2025 Season 2 on at
     
    So the error you are getting there, isn't related to sending data back, its simply doing something that isn't supported.
     
    If you want to send data back to a Canvas App or Model-Driven App, you must take the data you get from (whatever actions you do) and (the best way) is to form is into a JSON format.
     
    Then use the Response to a Power App action, and send it back via an outgoing string property.
     
    Then inside the App use the ParseJSON function (or depending on what you did back parse somehow) the data you want into something you can use.
     
    The above though isn't related to passing back data, its related to making an unsupported call.
     
    So make a copy to SQL
    Get your Data
    Use the Data to build a JSON structure
    Pass it back as a string in an Output parameter
    Reconstruct it into a Collection (aka JSON) in the App
  • Suggested answer
    PS-28031948-0 Profile Picture
    4 on at
    This is known issue and limitation in Power Automate. The error message has the reason - "Execute Native Sql is currently not supported using an on-prem gateway connection".
     
    Please refer to SQL Server - Connectors | Microsoft Learn Section: Known issues and limitations with actions.
     
    Workaround: Instead of using "Execute a SQL Query (V2)" and writing SQL, I used "Get rows (V2)" option and hit the view (If the query is complex - create it as view). While querying the view you may use filter option with 'OData' syntax. Provided screenshot for reference. 

    Thats the work around I used. This is just a workaround to handle the current limitation.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard