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

Powerapps return value problems

Hello everyone,

 

I'm having a problem with flow, that should return value to powerapps. I looked up few tutorial on this subject, but the end result differs for me. What I'm doing wrong?

 

Tutorials:

 

First:https://flow.microsoft.com/en-us/blog/return-data-to-powerapps/

Flow:https://sergeluca.wordpress.com/2018/04/22/powerapps-returning-values-from-flow/

image.png

expression value: concat(body('Create_file')?['Path'],body('Create_file')?['Name'])

 

PowerApps form:

 

Button trigger: Set(Result,'DOCX/PDFUzpildymas'.Run(var_vardpav,var_pareigos,var_data,var_nuo,var_iki,var_vadovas,var_darbuotojas))

 

And I want to return value as a string to a label. But what I get is only boolean True/False...

image.png

 

What am I doing wrong???

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Powerapps return value problems

Hi @Marcius3d ,

Have you defined the Result variale in other place within your app?

 

On your side, please consider remove all variables (global variable or context variable) from your app, then try your formula again, check if the issue is solved.

 

As an fixed solution, please consier re-create a new app, then add your flow connection, try your formula again, check if the issue is solved.

Note: Please make sure the Result variable you set up is unqiue in your app.

 

Your could also consider modify your formula as below:

Set(
     Result1,   /* <-- rename your variale to another name */
     'DOCX/PDFUzpildymas'.Run(var_vardpav,var_pareigos,var_data,var_nuo,var_iki,var_vadovas,var_darbuotojas).var_Done
)

then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Community Support Team
Community Support Team

Re: Powerapps return value problems

Hi @Marcius3d ,

Does your flow run well, and return a proper value within the "Respond to a PowerApp or a flow" action?

Do you add the "PowerApps" trigger button as the Trigger of your flow?

 

Based on the needs that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. Within your app, please consider modify your formula as below (Set the OnSelect property of the "Execute" button to following😞

Set(
Result,
'DOCX/PDFUzpildymas'.Run(var_vardpav,var_pareigos,var_data,var_nuo,var_iki,var_vadovas,var_darbuotojas).var_Done /* <-- Do not miss .var_Done here */
)

If the issue still exists, please consider re-create a new app, then add your flow connection within it, then try above formula again, check if the issue is solved.

 

Also please consider take a try to re-create a new flow to fix this issue on your side.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Marcius3d
Level: Powered On

Re: Powerapps return value problems

Something is wrong, and I don't get it what it is.

App

image.png

 

FLOW:

 

image.png

Community Support Team
Community Support Team

Re: Powerapps return value problems

Hi @Marcius3d ,

Have you defined the Result variale in other place within your app?

 

On your side, please consider remove all variables (global variable or context variable) from your app, then try your formula again, check if the issue is solved.

 

As an fixed solution, please consier re-create a new app, then add your flow connection, try your formula again, check if the issue is solved.

Note: Please make sure the Result variable you set up is unqiue in your app.

 

Your could also consider modify your formula as below:

Set(
     Result1,   /* <-- rename your variale to another name */
     'DOCX/PDFUzpildymas'.Run(var_vardpav,var_pareigos,var_data,var_nuo,var_iki,var_vadovas,var_darbuotojas).var_Done
)

then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Marcius3d
Level: Powered On

Re: Powerapps return value problems

Update:

 

After re-creating new app with the same flow and button, code started to work on new app and on old as well...

 

But now I have a second question. How should I go about getting more then one string as a respons ?

Community Support Team
Community Support Team

Re: Powerapps return value problems

Hi @Marcius3d ,

You could consider define multiple Text outputs within the "Respond to a PowerApp or a flow" action in your flow as below:1.JPG

Then within your app, you could refernece the variables as below:

Set the OnSelect property of the "Execute" button to following:

Set(
     ReturnedResult,   /* <-- rename your variale to another name */
     'DOCX/PDFUzpildymas'.Run(var_vardpav,var_pareigos,var_data,var_nuo,var_iki,var_vadovas,var_darbuotojas)
)

 

Then set the Text property of the Label1 to following:

ReturnedResult.var1

Then set the Text property of the Label2 to following:

ReturnedResult.var2

Then set the Text property of the Label3 to following:

ReturnedResult.var3

 ....

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Marcius3d
Level: Powered On

Re: Powerapps return value problems

Thank you, now everything is working. What I found interesting about this. That if I change flow, lets say I add one more string to return from flow, I have to change the name of retrieve var.

Set(
     ReturnedResult,   /* < ----- This name right here*/
     'DOCX/PDFUzpildymas'.Run(var_vardpav,var_pareigos,var_data,var_nuo,var_iki,var_vadovas,var_darbuotojas)
)

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 362 members 5,930 guests
Please welcome our newest community members: