cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Highlighted
Community Support
Community Support

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
Highlighted
Community Support
Community Support

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.
Highlighted
Frequent Visitor

Re: Powerapps return value problems

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

App

image.png

 

FLOW:

 

image.png

Highlighted
Community Support
Community Support

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

Highlighted
Frequent Visitor

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 ?

Highlighted
Community Support
Community Support

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.
Highlighted
Frequent Visitor

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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,954)