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 / Flow with result from ...
Power Automate
Unanswered

Flow with result from MSSQL-Stored procedure

(0) ShareShare
ReportReport
Posted on by 28

Hi,

I use a stored procedure in MSSQL with an Output-Parameter. When I start this SP in SQL-Management Studio I receive an integer value as output. Ok, it works fine.

When I use this SP in Power Apps Flows, the result what i get is NULL. Here is the Outputs:

{
 "statusCode": 200,
 "headers": {
 "Pragma": "no-cache",
 "Transfer-Encoding": "chunked",
 "Vary": "Accept-Encoding",
 "x-ms-request-id": "035bc1ef-23d3-487c-bb58-61ee00130807",
 "Strict-Transport-Security": "max-age=31536000; includeSubDomains",
 "X-Content-Type-Options": "nosniff",
 "X-Frame-Options": "DENY",
 "Timing-Allow-Origin": "*",
 "x-ms-apihub-cached-response": "true",
 "Cache-Control": "no-store, no-cache",
 "Date": "Mon, 01 Mar 2021 08:47:42 GMT",
 "Content-Type": "application/json; charset=utf-8; odata.metadata=minimal",
 "Expires": "-1",
 "Content-Length": "39"
 },
 "body": {
 "ResultSets": {},
 "OutputParameters": {}
 }
}

 

I think the place of the MSSQL-Result is in the body/ResultSets, correct?  

What can I do here?

 

Thanks

Torsten

Categories:
I have the same question (0)
  • torsten156 Profile Picture
    28 on at

    Hi @ManishJain 

     

    sorry for my late reply...

    I've changed now the SP with a select statement. Here is the Code:

     

    ALTER PROCEDURE [dbo].[Check_existing_WH] 
    	-- Add the parameters for the stored procedure here
    	@pCompany int = 0,
    	@pSite int = 0,
    	@pMonth varchar(10) = 'Jan',
    	@pYear int = 0,
    	@return int OUT
    
    	
    AS
    BEGIN
    
    	SET NOCOUNT ON;
    
    	if not exists (SELECT WH_Employee from [dbo].[tbl_Working_Hours] where Company = @pCompany AND Site = @pSite AND Month = @pMonth AND Year = @pYear)
    		Begin
    			select @return = 0
    		End
    	Else
    		Begin
    			select @return = 1
    		End
    END

    In MSSQL I get a result (1 or 0). This procedure works fine.

     

     When I use this SP in Power Apps, I don't get a return value. In the body-area I get this:

     

    {
     "ResultSets": {},
     "OutputParameters": {}
    }

     

    What is my problem here???

     

    Regards

    Torsten

  • MJain Profile Picture
    2,450 on at

    HI @torsten156 ,

     

    In your Stored procedure return by putting select statement.

     

    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

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
David_MA Profile Picture

David_MA 245 Super User 2025 Season 2

#2
Expiscornovus Profile Picture

Expiscornovus 207 Most Valuable Professional

#3
trice602 Profile Picture

trice602 185 Super User 2025 Season 2

Last 30 days Overall leaderboard