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

Run() Flow does not pick up edited form field from Powerapps

Hello,

here is a simplified description of my problem:

 

  • I ask the user for a comment (field in form vie Form.edit)
  • User clicks a 'send' button. OnSelect properties:
    • Patch to write the comment back into the source file (SharePoint list) 

 

Patch(AP_Data,GalleryAP.Selected,{Comment:Comment_Field.Text});​

 

  • run a flow to send out an email, that includes the previously updated comment field:

 

email.Run(...,...,...,If(IsBlank(GalleryAP.Selected.Comment),"n.a.",GalleryAP.Selected.Comment),...,);​

 

I'm thinking that the patch function is not quick enough to save the content in time for the Run()-function to pick it up, as I most often get an "n.a" returned. It works sometimes, but that is of course not good enough.

 

BTW, when i remove the if(isblank(), I get the following error, which i believe is returned when a blank field is passed through Run(): 

 

Email.Run failed: The method 'Run' has an invalid value parameter 'Sendanemail(V2)_Body_15'

 

 

Has anyone experienced this issue before. Can anyone think of a solid workaround for this issue?

 

Thanks,

Tobias 

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Level 8

Re: Run() Flow does not pick up edited form field from Powerapps

@Krau5i 

Have you tried using REFRESH before calling your Flow?

 

Patch(AP_Data,GalleryAP.Selected,{Comment:Comment_Field.Text});​
Refresh(AP_Data);
email.Run(...,...,...,If(IsBlank(GalleryAP.Selected.Comment),"n.a.",GalleryAP.Selected.Comment),...,);​

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

4 REPLIES 4
mdevaney
Level 8

Re: Run() Flow does not pick up edited form field from Powerapps

@Krau5i 

Have you tried using REFRESH before calling your Flow?

 

Patch(AP_Data,GalleryAP.Selected,{Comment:Comment_Field.Text});​
Refresh(AP_Data);
email.Run(...,...,...,If(IsBlank(GalleryAP.Selected.Comment),"n.a.",GalleryAP.Selected.Comment),...,);​

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Community Support Team
Community Support Team

Re: Run() Flow does not pick up edited form field from Powerapps

Hi @Krau5i ,

I have made a test on my side, please consider take a try with the following workaround:

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

Set(   // Save the Patch result into a variable
    SubmittedRecord, 
    Patch(AP_Data, GalleryAP.Selected, {Comment:Comment_Field.Text})
);
// Reference the Comment field value from above variable
email.Run(...,...,..., If(IsBlank(SubmittedRecord.Comment), "n.a.", GalleryAP.Selected.Comment),...,);​

Please take a try with above solution, 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.
Krau5i
Level: Powered On

Re: Run() Flow does not pick up edited form field from Powerapps

I tried your solution as well but could not get it to work in my example. However, problem is solved with Refresh().

 

Thanks!

mdevaney
Level 8

Re: Run() Flow does not pick up edited form field from Powerapps

@Krau5i 

Happy to see you issue is now fixed!

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: 155 members 5,397 guests
Please welcome our newest community members: