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 / How do I use OutputPar...
Power Automate
Unanswered

How do I use OutputParameters from "Execute Stored Procedure" action's Stored Procedure ?

(1) ShareShare
ReportReport
Posted on by 1,724

I want to use Output value from my Stored Procedure in "SQL Server - Execute Stored Procedure" action.

Now, I can use "ReturnCode".

 

My Stored Procedure:

 

ALTER PROCEDURE [dbo].[DNN_Rousei_Test]
(
	@Param1 nvarchar(10),
	@Result nvarchar(10) OUT
)
AS
BEGIN
	SET NOCOUNT ON;

	SELECT @Result = @Param1 + '!!'

	RETURN 0
END

 

My Flow:

1.PNG

Regards

Yoshihiro Kawabata;

 

Categories:
I have the same question (0)
  • aerowork Profile Picture
    5 on at

    I would also like to know how to use the SQL data as an output to other steps.

  • v-yamao-msft Profile Picture
    on at

    Hi Yoshihiro,

     

    This article about “Connecting up Microsoft Flow, SQL and Twilio” would be a reference for you.

     

    The link of the article is:
    https://flow.microsoft.com/pt-br/blog/connecting-flow-sql-twilio/

     

    Best regards,
    Mabel Mao

  • yoshihirok Profile Picture
    1,724 on at

    Hi, @v-yamao-msft

     

    This article does not include my issue.

    "Connecting up Microsoft Flow, SQL and Twilio".

     

    I want to know How do I use OutputParameters frrom Execute Stored Procedure.

    This article seems to call SPROC, but dont use OutputParameters.

     

    Regards,

    Yoshihiro Kawabata 

  • Ed_Solman Profile Picture
    4 on at

    I was having the same issue, trying to access the Output Parameters from a SQL stored proc. Say my proc was outputting values X and Y. I created a new table in SQL that had columns X and Y, then changed the proc so it wrote the X and Y values to the X and Y columns in the new table, instead of outputting them. I then used the SQL Get Rows flow action to retrieve the values from the table and could then use them in subsequent flow actions. 

     

    One further point.. My table only has 1 record containing the X and Y value from the last time the procedure ran, because I just overwrite it each time. I tried using the 'SQL Get Row' (a single row) action, but I've no idea how the 'Row Id' parameter works and can't find any help on it. So I ended up using the 'SQL Get Rows' (plural) instead, which automatically put a 'For Each' wrapper around any subsequent actions where you use the values, as it assumes you might potentially retrieve multiple rows of data, and need to perform those actions for each row.

     

    All a bit of a dirty workaround, but it works OK.

     

     

    Hope that helps:)

  • Meneghino Profile Picture
    6,949 on at

    Hi all, is there any update on this topic?

    Many thanks.

  • sundayDriver Profile Picture
    on at

    @yoshihirok, @Meneghino, @aerowork

     

    I found that there is an idea posted about this topic:

    https://powerusers.microsoft.com/t5/Flow-Ideas/Map-SQL-output-for-use-in-other-steps/idi-p/6766

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 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard