cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jernejp
Level: Powered On

Flow not returning the variable, returns True instead

Hi,

 

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?

1 ACCEPTED SOLUTION

Accepted Solutions
jernejp
Level: Powered On

Re: Flow not returning the variable, returns True instead

I've "solved" the issue by using the Patch function.

7 REPLIES 7
Super User
Super User

Re: Flow not returning the variable, returns True instead

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.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
jernejp
Level: Powered On

Re: Flow not returning the variable, returns True instead

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.

Super User
Super User

Re: Flow not returning the variable, returns True instead

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.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
jernejp
Level: Powered On

Re: Flow not returning the variable, returns True instead

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.

Super User
Super User

Re: Flow not returning the variable, returns True instead

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?



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
jernejp
Level: Powered On

Re: Flow not returning the variable, returns True instead

Just checked again - it's supposed to be a semicolon.

screen1.png

 

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)

jernejp
Level: Powered On

Re: Flow not returning the variable, returns True instead

I've "solved" the issue by using the Patch function.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 202 members 4,544 guests
Please welcome our newest community members: