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?

7 REPLIES 7
Pstork1
Level 8

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.

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.

Pstork1
Level 8

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.

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.

Pstork1
Level 8

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?

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.