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 Apps / SQL Server stored proc...
Power Apps
Unanswered

SQL Server stored procedures (Upcoming features)

(0) ShareShare
ReportReport
Posted on by 3

Hey all,

 

Some strange behaviour when using the preview connection.

Within the procedure I'm invoking an external rest endpoint using the sys.sp_invoke_external_rest_endpoint, which returns a JSON string, within SQL I then parse that into a table and return the result. The only way I can get it to work is to modify the proc:

Alter Procedure dbo.myHeadache 
 @url nvarchar(max)
 @query nvarchar(max)
AS
Begin

Select 
 'hello' as fieldName
 -- add other required fields

-- Replace the select statement with the sys.sp_invoke_external_rest_endpoint
-- After importing into PowerApps

End

After the first load in PowerApps I can then implement the external rest call by reverting the procedure. I've also tried:

  • modifying the procedure to use a flag to switch the return results from the sudo table to the parsed json table
  • calling the procedure from another procedure

I hope this saves someone some pain.

Categories:
I have the same question (0)

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard