Showing results for 
Search instead for 
Did you mean: 

Calling a Stored Procedure in PowerApps

It would be fantastic to have stored procedure access to PowerApps. It's a feature presently blocking a number of customers of ours from implementing PowerApps since much of their logic is in the sprocs already. They don't want to implement Flow for this since they see it as another cog to pay for. This seems like pretty core functionality but there must be some big technical blocker from MS implementing it. 

Status: Under Review
Level 8

@RussellGove, I agree with you there of course since I'm a data guy at heart. I'm doing a live video in about 45 minutes here (9amEST) to walk through how to do this with the assistance of Flow: There will be a recording in case you miss it at the same link.


I realize it's not perfect but it's the only way at this time outside of a custom connector. 

Level 8

Another option, for DB guys, to avoid flow it to use what we in LightSwitch called the 'Command Table Pattern'.


Basically you create a table in SQL Server database that accepts 'command' records.  Then you create an AFTER INSERT TRIGGER in SQL on this table which executes sprocs server-side. 


PowerApps will add a record in this table and the sprocs execute on the server and update this table with result.


This is easy for spocs that just execute an 'action' on the server without a bunch of input variables/fields, but can also be used to pass data with more config.




Level 8

Thanks @BrianKnight, greate viedeo.! So with that IsError thing you spoke about can i pass an error from the sproc, through the flow, and back to the powerapp?

Level 8

 Hi @RussellGove I'm afraid I misspoke in the video. It's actually IfError. I'll work on an example today for that and post soon. It's still experimental and tempermental. Smiley Happy

Level: Powered On

Thanks fot posting this important idea Brian.