Hello PowerApps Community,
I've been using a flow that is triggered by PowerApps button and wanted to put some error handling on it so users know if it ran successfully or not.
First, I noticed that trying to name the "Respond to PowerApps" action variable (of any type of response) will close all of the previous actions making it extreamly hard to type in. Then, if I save, close, and re-open the flow it doesn't save the variable name I typed in, it just defaults it to "number", "boolean", etc. I can't tell if this is a bug. Is anyone else experiencing this? It's happening on multiple different Office 365 tenants of mine.
Second, when I get the flow added to a PowerApps button by follow these instructions, my flow runs successfully, but the PowerApp isn't getting the value that the flow says it passed back.
I've done this previously, so I know that there's a way to do this. Any thoughts or insights? Is anyone having difficulty with this?
I just did this with an app yesterday and didn't have any of the issues you are describing. AS you can see from the following screenshot I have multiple actions openand am currently editing the dynamic data for the return value. This is an App and Flow I built over the weekend. I have seen the issue with getting the return value to register if I build the Flow and then add the return value later. In those cases I remove the Flow from the PowerApp and re-add it and it works. I'm not sure why its happening to you. You might want to open a service ticket since it seems to be a local issue.
I am also facing the second issue, the flow shows that it has responded, but within PowerApps all I receive is blank values. I tried boolean and number fields.
This is happening in one of the emea environments. My other environment with existing flows responding to PowerApps are working fine.
I tried responding with Text fields and that is working fine, I am just using this as a workaround for now.
I can confirm the issue. I did the entire clear cache, rebuild flow, rebuild app, ... without success. When I used @NitinChhajer workaround by adding a text response field with the same value, I received a response (ID is the Output of a SharePoint Create Folder action):
@Pstork1is this the right place to lodge a bug report?
I'm intrigued by your screenshot here of capturing succeeded or failed on creating a SharePoint file, then returning this to PowerApps. I need to capture status for creating a new item in a SharePoint list. Can you please elaborate on how you designed the variables beneath the Create File in SharePoint action, and what's within the Status variable in the Respond to PowerApps action?
That screenshot is from @DennisKuhn1 , not me.
Yes, that's my screenshot. But the other one is more about capturing specific error or status codes. I'm just storing whether the action succeeded or not in a variable and then returning that variable to Power Apps.
Any update on this?
Just created a Flow that should respond:
As a test I used the exact same Variable (an Integer) in the output but one Response Type is of Number and other Response Type is Text. I put the Run Outcome of the Flow in a Power App Global Variable:
As a variation I even put the Number type in an Int() expression:
I am amazed that somehting this simple still has a bug?
I do think there is a bug in the Respond to Power Apps somewhere. But here is what I've gotten to work. Make sure that the first and last properties of the return object are strings. When I do that the JSON for the number being returned is actually a number. If you look at yours its a string, which is why Power Apps thinks its null. Here's the output from one of my test runs with a string, a number, and a string. You'll see that the middle return value is a number, not a string.