Anyone know if its possible to update a variable from flow. I have a spinner that is visible when I run a flow from powerapps. My visible property: UpdateContext({varSpinner:true});NCAThreshold.Run(insert.Text); UpdateContext({varSpinner:false})
The problem is the flow runs a stored procedure but the spinner stops displaying after the first step in the flow. Is there a way I canput the last part UpdateContext({varSpinner:false}) in a flow and send it back to powerapps so the spinner/ lopading icon only disappears when the flow has finished?
You can return a value from the Flow when it completes and use that value to update your context. The action you need is Respond to PowerApps. Have that return a False value from the Flow. Then modify the run command that calls the Flow like this.
UpdateContext({varSpinner:true});UpdateContext({varSpinner:NCAThreshold.Run(insert.Text)})
That will set the variable to true and then start the flow. When the flow completes the return value will update varSpinner.
Thanks. It almost works but I might be something wrong. It looks as though when I put in that part it runs the stored procedure multiple times. The spinner goes away but then when I look at the database there looks like multiple runs of the stored procedure.
My flow looks as follows:
PowerApps -> execute stored procedure -> respond to powerapps.
I selected output as Text.
Not sure if this helps but here's the JSON file for the respond to powerapps section
Not sure why it would be running multiple times. Is the respond action at the end of the Flow? Also make sure its not in a Loop.
Hi @Ph ,
Could you show me your flow's screenshoot?
What's more, I suggest you post your issue here:
https://powerusers.microsoft.com/t5/Microsoft-Flow-Community/ct-p/FlowCommunity
The engineers there is more professional about flow, they can provide better advice.
Best regards,
Community Support Team _ Phoebe Liu
Thanks. I deleted the button and tried to recreate it but now it looks like PowerApps can evaluate this part
;UpdateContext({varSpinner:NCAThreshold.Run(insert.Text)})
Thanks I'll post it to that group as well. Not sure if the issue is in my flow or powerapps.
My flow:
User | Count |
---|---|
183 | |
123 | |
88 | |
45 | |
42 |
User | Count |
---|---|
254 | |
160 | |
126 | |
78 | |
73 |