cancel
Showing results for 
Search instead for 
Did you mean: 

Collect from stored procedure

I would looooove if the collect() function could take an Azure SQL DB stored procedure with params. That would open PowerApps to some very powerful and flexible enterprise scenarios where all the business logic and heavy lifting could be done server-side by the DB.

 

We could limit it to the first resultset returned by the proc to simplify things. The cherry on the top would be to be able to update a record with a proc, but hey, one fight at a time. ^^

 

cheers

Status: Under Review

Updating status and adding @LanceDelano

Comments

Ps: make this a premium connector if it’s a licensing issue...

WPB
Level 8

Hello!

Found a solution:  Video

 

Hey @WPB

 

Interesting workaround! Have you tried this in production? On the top of my head, two questions come to mind :

  1. If you make a full proc interface layer, you have a serious risk of burning through your Flow quotas.
  2. How's the performance ? Does adding a Flow instance as a man-in-the-middle add a delay that makes loading screens not really responsive ?

Thanks for the input anyway. There are definetly few use cases that where this sounds promising regarldess of being able to use this technique more widely!

WPB
Level 8

Hey @FredericForest,

 

Here is a little speed test:

UpdateContext({StartTime:Now()});
ClearCollect(ViewCollection,'[dbo].[Table_Test_View]'); // Create a View collection
UpdateContext({MidTime:Now()});
Set(ProcCollect,ReturnArray_Test.Run()); // Create a collection from a Procedure
UpdateContext({EndTime:Now()})

Results:Capture.PNG

So, even if you take 1-2 secondes more with a view, it definately gets faster once loaded. You can clearely see the impact of the middle-man here but, it's still really acceptable in most cases.

 

Hope it helps!

 

 

PowerApps Staff
Status changed to: Under Review

Updating status and adding @LanceDelano

WPB
Level 8
Level: Powered On

Please bring back this feature. Its removal has wasted me hours just to find this post.

All I get back is True.

@SoftFeta:  strange. I did a POC 2 weeks ago using thus method and it worked fine...

WPB
Level 8

Still not working for me...


Level: Powered On

I'm also having the issue where all I get back is true...any further updates to this issue or a fix?