Hey John, quick Q for ya.
You mention having a PowerApps call a flow which then calls the SP. From what I've read, Flow does not communicate back to PA when it completes, so you aren't able to verify if the flow was successful or if it got hung up.
Do you have any solutions on how to get the UI to update in these instances or do your apps just let the user know it was submitted and call it good?
I have a PowerApp that, when I press a button, it executes a stored procedure via a Flow - the stored procedure inserts a number of records into a table. After this job is complete (takes 2-4 seconds), I would like the Powerapp to refresh the datasource (;Refresh([Datasource])). But for now, the Refresh command executes before the SP (and flow) has finished inserting the records.
Any idea as to how I can use this (or another) method somehow to make the Powerapp refresh the datasource only when the SP has completed?
Two options jump out to me
1. Use a timer in PowerApps to wait 5 seconds to refresh the page. PowerApps Timer Control
2. Return a variable from Flow to PowerApps when your update is done and then refresh your data source. PowerApps Flow Intro (Video isn't an exact match but does show you how to return a variable if that is new to you)
@Shanescows: Thanks for the tip. Great video by the way, really helpful.
But do you know if passing a variable back to Powerapps from Flow, will actually make Powerapps wait for the variable to get returned before executing the next part of the function (the refresh part)? - Pseudo: Set(VariableName,StoredProcedure.run).Return;Refresh(Datasource)
What a truly great tip, I have now converted all my "Insert checklist" functions to use a MS SQL stored procedure instead and it seems to be working very well so far. It's many times faster and much more reliable.
I have been trying to find a way to implement this for quite some time, so a great day today indeed. Thanks again.
Tomorrow, September 24st at 10am PDT
Continue your learning in our online communities.
Features releasing from October 2019 through March 2020
Coming to a city near you
Fill out a quick form to claim your user group badge now!
Connect, share, and learn with your peers year-round
Register by September 5 to save $200