cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
365-Giovanni
Frequent Visitor

Calling Stored Procedure from Power Automate issue

Hi guys,

 

I'm trying to build a canvas app that passes a serial number to a stored procedure and the results are fed back and shown in a table.

 

I know I need to create a Power Automate flow to call the Stored Proc, thats where im struggling:

 

Following some guides, I know I need to do a select on the outcome of a store proc, however I get no 'value' results - I know the stored proc works in flow as I've tested it and can succesfully see the data return in a JSON object.

 

Whre Im trynig to achieve is:

  1. Canvas app - user inputs a serial number
  2. Store proc returns details or orders with that serial number
  3. Canvas app shows lines in a grid

 

 

What am i doing wrong?

 

365Giovanni_0-1632155342212.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User
Super User

@365-Giovanni 

The typical way to do this is to return the output of your stored procedure from Flow using a 'Response' action, rather than a 'Select' action, which is what you have in your screenshot.

 

The key step is to specify the 'Response Body JSON Schema' value, and Mr Dang's post here provides a great explaination. You can effectively take this example, and replace the 'Execute a SQL Query' action with your 'Execute Stored Procedure' action.

https://powerapps.microsoft.com/en-us/blog/return-an-array-from-flow-to-powerapps-response-method/

 

View solution in original post

3 REPLIES 3
Nogueira1306
Community Champion
Community Champion

Hey! My Advice would be:

 

1. Trigger

2. Get SQL rows and set filter to SerialNumber eq 'PowerAppsSerailNumber'

3. Select with the rows from the filter

4. Send the email with the output

 

Plus, there is a Power Automate community, they might be better

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

Hi thanks for reply, I'm using a store procedure so can't use Get SQL Rows

timl
Super User
Super User

@365-Giovanni 

The typical way to do this is to return the output of your stored procedure from Flow using a 'Response' action, rather than a 'Select' action, which is what you have in your screenshot.

 

The key step is to specify the 'Response Body JSON Schema' value, and Mr Dang's post here provides a great explaination. You can effectively take this example, and replace the 'Execute a SQL Query' action with your 'Execute Stored Procedure' action.

https://powerapps.microsoft.com/en-us/blog/return-an-array-from-flow-to-powerapps-response-method/

 

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,791)