cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ptempleton
Helper II
Helper II

HTML code not always being sent from PowerApps to Automate

I have an application that is converting data from a form and datatable into html and then sending the html to flow to convert to PDF. The problem that I am having is that at least every first time that a pdf creation is triggered, I receive "Show your HTML text here" instead of the data that should be in the pdf: 

ptempleton_0-1602516645560.png

 

I can run the same request again and will get the correct data displayed. I did go through and make sure that the "Show your HTML text here." was not showing in my html text control properties. The code to trigger the flow is: UpdateContext({varPDFHidden:true});Set(fileurlvar,MakePDF.Run(HtmlText2.HtmlText, OrderNumberLBL.Text & " " & GUID()));UpdateContext({varPDFHidden:false});Launch(fileurlvar.url); My flow looks like this: 

ptempleton_1-1602516699001.png

 

 

I have verified that the data received by Power Automate from PowerApps is the issue via the html variable.

 

Any ideas on how I can fix this issue?

3 REPLIES 3
ptempleton
Helper II
Helper II

disregard this request.  I was unable to figure out how to stop that message so I just put some error handling in place so that if that message is in the HTML text component then to pop a message to the user to resubmit.

 

UpdateContext({varPDFHidden:true});If(HtmlText2.HtmlText = "Show your <b><font color=blue>HTML</font></b> text here.",UpdateContext({varErrorPage:true}),Set(fileurlvar,MakePDF.Run(HtmlText2.HtmlText, OrderNumberLBL.Text & " " & GUID()));UpdateContext({varPDFHidden:false});Launch(fileurlvar.url));UpdateContext({varPDFHidden:false})

 

This will set varErrorPage to true if "Show your HTML text here." is in the HtmlText component which then unhides an error group and does not send the info to Automate prompting the user to resubmit their request..

Hey @ptempleton, I see you say disregard, but this is interesting.

 

You say you have made sure Power Automate receives the correct information, but did you make sure that Power Automate sends the correct information to Power Apps that first time?

that is the problem... PowerApps does not always send the correct HTML code to Automate to generate a pdf.  I have reviewed the Automate runs to see that the html received from PowerApps sometimes has the "Show your HTML text here." instead of the html that is actually showing in the app if I look directly at the htmltext2.htmltext.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (4,198)