I'm building an app that inserts into a SQL database and should return the row ID when it's finished.
I've set up a flow that inserts into database, and then setup to return the variable back to PowerApps.
When I try to Set the variable in PowerApps, I get True instead of the ID.
Set(MyVariable; MyFlow.Run( // Arguments )
The insert is done perfectly it's only the return that doesn't work.
Any suggestions on what might be the problem?
Solved! Go to Solution.
I assume you are returning an Integer as the RowId. I suspect that PowerApps is consuming it as a Variable when it sets the Variable. Try modifying your Flow to return the RowID as a string and see if that doesn't help.
Thanks for your answer. I tried doing that, and while in Flow I see the correct id (as before), it's still only passed as True to PowerApps.
I've modified the response to be "The id XX" (where XX is the number), and still only got true as a response.
I just noticed something else. In your SEt statement you are seperating the variable from the run statement with a ';' (semicolon) it should be a ',' (comma). I think Powerapps is handling your set as a seperate statement rather than the first parameter.
For some reason, as soon as I replace the semicolon with a comma, I start getting an error. Could this be a locale issue (Slovenian)? I saw some tutorials online that used a comma, but I always got an error when I tried.
I suppose it could be a locale issue. But the switch from comma to semicolon in locale is usually related to formatting of strings and numbers. I didn't think it applied to syntax. When you hover inside the set command in the function bar what does intellisense show you the seperator between properties should be?
What exactly is your formula and what does the error say?
Just checked again - it's supposed to be a semicolon.
As for the error - it says Unexpected character. Formula has "ParenClose", but "Error" is expected. And the second one is Unexpected character. Characters in formula are used in an unexpected way. (Tried my best to translate)
Continue your learning in our online communities.
Let's thank our top community contributors
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
Features releasing from April 2019 through September 2019!
August 20-23rd 2019