web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / HTML code not always b...
Power Apps
Unanswered

HTML code not always being sent from PowerApps to Automate

(0) ShareShare
ReportReport
Posted on by 65

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?

Categories:
I have the same question (0)
  • ptempleton Profile Picture
    65 on at

    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..

  • DylanSimons Profile Picture
    326 on at

    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?

  • ptempleton Profile Picture
    65 on at

    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.

  • johnomahoney1 Profile Picture
    2 on at

    Hi

    Any resolution to this issue??

    it is happening occasionally with no indication of why when examining the flow (or I can't figure it out)

    Creating some error trapping is ok as an interim fix but it should not happen in the first place?

    Any tech explanation from microsoft to explain why it happens and if there is a solution ~(even in the pipeline)

  • ptempleton Profile Picture
    65 on at

    I never did find a full resolution for this issue.  The error trapping was the only solution that I could come up with that stopped "Show your HTML text here" from being sent to flow.  

  • Arne_R Profile Picture
    97 on at

    Hi

    I have the same problem. 

    I use 1 flow, in different places, to convert different HTML text to PDF.
    The flow works correctly everywhere, except for 1 location.

     

    If I run the flow from a PC, it works as it should. If I run the flow from my mobile, the html text never works (only in that specific place in my app).

    The html-text uses 'concat' where I have several lines written out in a table. If I remove the variables from my collection, out of the the html-text, it also  works.

     

     

    Anyone have a solution?

    Thanks! 

  • Arne_R Profile Picture
    97 on at

    Hey

    I just found that my code works correctly if I run it with "OnSelect". So far my code was at "OnHidden".

    The code will work if it is "OnHidden" from a desktop, but not via a mobile.

  • QualitrolRick Profile Picture
    12 on at

    This has recently started happening to an app that has worked fine for years where passing the html.htmltext over as an 'Ask in Powerapps' is changing to the "Show your HTML text here".  This always works fine in the app maker but after publishing it fails.  I tried creating a new flow with the same options, creating a new button and it still failed after being published.

     

    What finally worked was setting the text of a label to the html.htmltext property then passing the label.text through as an argument.  Really strange...

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard