cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Microsoft
Microsoft

Fetching data from Result set on the execution of Stored procedure

I can execute a stored procedure using Logic Flows but how can I fetch the data from the result set, cause just executing the SP and not getting any data will not make any sense.

7 REPLIES 7
Highlighted
Community Support
Community Support

Re: Fetching data from Result set on the execution of Stored procedure

Hi Prachi,


What kind of data do you want to get when you execute stored procedure? How do you want to get the data?

 

Followed by “Execute stored procedure”, you could add other actions such as “Create file” with Dropbox, “Send an email” with Office 365 Outlook, etc. So please try to create flows followed by other actions to fetch the data you want.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Microsoft
Microsoft

Re: Fetching data from Result set on the execution of Stored procedure

I am passing some parameters from PowerApps then executing the SP the result set that is returned from the SP that I need to display in my app.

Highlighted
New Member

Re: Fetching data from Result set on the execution of Stored procedure

I had the same issue, go see my solution at the link below. 

 

https://powerusers.microsoft.com/t5/Building-Flows/Unable-to-utilize-ResultSets-value-with-Condition...

 

 

Highlighted
New Member

Re: Fetching data from Result set on the execution of Stored procedure

1.call from the flow your SP.

2. then where you want to return the parameter put: body('yourSPName')?['ResultSets']?['Table1']?[0]?['YourColumnNameReturned']

Highlighted
Regular Visitor

Re: Fetching data from Result set on the execution of Stored procedure

Don't seem to be able to make this work

 

Here is the call to the SP

spsetup.PNG

 

Here is the step which uses the result of the SQL call

 emailsetup.PNG

Here is the output from the SP

spresut.PNG

 

Here is what the email looks like

 

emailout.PNG

 

Can't see what I am doing wrong.  Anybody spot it?

Highlighted
Advocate V
Advocate V

Re: Fetching data from Result set on the execution of Stored procedure

So I had this same issue and the fix is somewhat odd.  The formula is probably correct but it seems you have to enter it into the Expression box.  So expand the Add Dynamic Content pane, select the Expression tab, and then copy and paste your body() tag into that text box.  Then click Ok.  You will note that it creates a tag of the expression you entered and now it will actually get processed correctly.  It appears you can't just type in the path without going throught the Expression tab.

Highlighted
Anonymous
Not applicable

Re: Fetching data from Result set on the execution of Stored procedure

Thank you SOOO much wjhepworth.  I had been banging my head against a wall for hours.  🙂

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (6,200)