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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Using Flows In Powerapps
Power Apps
Unanswered

Using Flows In Powerapps

(0) ShareShare
ReportReport
Posted on by 71

Hello I'm building an app and I encounter a strange issue with my flow that I can't solve.

I had created a flow to print a pdf and it worked on my first app. when i copied the flow to use it on the second one the pdf came out blank. The HTML file is ok on both but not the pdf.

The onli difference between the original flow and the copied one are the destination folder and the referencec inside the html as below. 

Attached are pictures of the two flows

and here the instructions

Instruction on the onselect function for the working flow

'PowerApp->Createfile,Convertfile,Createfile2'.Run("<!DOCTYPE html>
<html>
   <head>
      <title>HTML Table</title>
   </head>
 
   <body>
      <table border = '1' width = '100%'>
         <thead>
            <tr><td>
               <img src=" & JSON(Image1.Image,JSONFormat.IgnoreBinaryData ) &" height='65' width='65'></td>
               <td  colspan = '3'><b>Defects Report<b/> "& DataCardValue18.Text & " </td>
            </tr>
            <tr>
              
            </tr>
         </thead>
        
         <tfoot>
            <tr>
               <td colspan = '4'><b>* Refers to articulated lorry and trailer combinations.
** Refers to popular FORS elements. Please note that this is not a complete representation and reference should be made to your FORS accreditation level.<b/></td>
            </tr>
         </tfoot>
        
         <tbody>
            <tr>
               <td colspan = '4'><b>Driver''s Name:</b></td>
            </tr>
            <tr>
               <td colspan = '4'>"& DataCardValue17.Text &" </td>
            </tr>
            <tr>
               <td colspan = '4'><b>Vehicle / Fleet Number</b></td>
            </tr>
            <tr>
               <td colspan = '4'>"& DataCardValue18.Text &" </td>
            </tr>
            <tr>
               <td colspan = '4'><b>Odometer Reading</b></td>
            </tr>
            <tr>
               <td colspan = '4'>"& DataCardValue24.Text &" </td>
            </tr>
            <tr>
               <td colspan = '4'><b>Vehicle Defect report Date: <b/>"& DataCardValue23.SelectedDate &"</td>
            </tr>
             <tr>
               <td><b>Fuel / oil / Water leaks</b></td>
        <td><b>Battery Security</b></td>
               <td><b>Tyres / Wheels and Wheels Fixing</b></td>
               <td><b>Spray Suppression Devices</b></td>
               </tr>
            <tr>
               <td> "& DataCardValue26.Selected.Value &" </td>
               <td> "& DataCardValue28.Selected.Value &" </td>
               <td>"& DataCardValue30.Selected.Value &" </td>
               <td> "& DataCardValue33.Selected.Value &" </td>
               </tr>
            <tr>
               <td><b>Registration Plates</b></td>
               <td><b>Prominent External Warning Signage*</b></td>
               <td><b>Body and Wings Condition / Security</b></td>
               <td><b>Side Guards / Under-Run Protection**</b></td>
            </tr>
            <tr>
               <td> "& DataCardValue35.Selected.Value &" </td>
               <td> "& DataCardValue37.Selected.Value &" </td>
               <td> "& DataCardValue39.Selected.Value &" </td>
               <td> "& DataCardValue41.Selected.Value &" </td>
            </tr>
            <tr>
               <td><b>Brakes, Including ABS / EBS</b></td>
               <td><b>Air Build-Up / Leaks</b></td>
               <td><b>Steering</b></td>
               <td><b>Mirrors / Class IV (wide-angle) Class V (Proximity) / Class VI (forward mirrors)**</b></td>
            </tr>
            <tr>
               <td> "& DataCardValue43.Selected.Value &" </td>
               <td> "& DataCardValue45.Selected.Value &" </td>
               <td> "& DataCardValue47.Selected.Value &" </td>
               <td> "& DataCardValue49.Selected.Value &" </td>
            </tr>
            <tr>
               <td><b>'0' Licence Visible</b></td>
               <td><b>Camera and Detection Sensors**</b></td>
               <td><b>Cab Interior / Seat Belts</b></td>
               <td><b>Speedometer / Speed Limiter</b></td>
            </tr>
            <tr>
               <td> "& DataCardValue51.Selected.Value &" </td>
               <td> "& DataCardValue53.Selected.Value &" </td>
               <td> "& DataCardValue55.Selected.Value &" </td>
               <td> "& DataCardValue57.Selected.Value &" </td>
            </tr>
            <tr>
               <td><b>Excessive Engine Exhaust Smoke</b></td>
               <td><b>Tachograph / Sifficient Print Rolls</b></td>
               <td><b>Lights / Reflectors / Markers</b></td>
               <td><b>Indicators / Side Repeaters</b></td>
            </tr>
            <tr>
               <td> "& DataCardValue59.Selected.Value &" </td>
               <td> "& DataCardValue61.Selected.Value &" </td>
               <td> "& DataCardValue63.Selected.Value &" </td>
               <td> "& DataCardValue65.Selected.Value &" </td>
            </tr>
            <tr>
               <td><b>Tail-Lift and Safety Equipment**</b></td>
               <td><b>Warning Lamps / MIL</b></td>
               <td><b>Lenses (e.g. Fresnel)**</b></td>
               <td><b>Wipers / Washers / Horn</b></td>
            </tr>
            <tr>
               <td> "& DataCardValue67.Selected.Value &" </td>
               <td> "& DataCardValue69.Selected.Value &" </td>
               <td> "& DataCardValue72.Selected.Value &" </td>
               <td> "& DataCardValue74.Selected.Value &" </td>
            </tr>
            <tr>
               <td><b>AdBlue / EDF (if required)</b></td>
               <td><b>Windscreen / Glass / Visibility</b></td>
               <td><b>Load Security / Vehicle Height</b></td>
               <td><b>Brake Lines*</b></td>
            </tr>
            <tr>
               <td> "& DataCardValue76.Selected.Value &" </td>
               <td> "& DataCardValue78.Selected.Value &" </td>
               <td> "& DataCardValue80.Selected.Value &" </td>
               <td> "& DataCardValue82.Selected.Value &" </td>
            </tr>
            <tr>
               <td><b>Coupling Security*</b></td>
               <td><b>Electrical Connections</b></td>
            </tr>
            <tr>
               <td> "& DataCardValue85.Selected.Value &" </td>
               <td> "& DataCardValue10.Selected.Value &" </td>
            </tr>
            <tr>
               <td colspan = '4'><b>Defect Report Here:</b></td>
            </tr>
            <tr>
               <td colspan = '4'>"& DataCardValue11.Text &" </td>
            </tr>
            <tr>
               <td colspan = '4'><b>Defect Assessment and Rectification:</b></td>
            </tr>
            <tr>
               <td colspan = '4'>"& DataCardValue12.Text &" </td>
            </tr>
 </tbody>
 
</html>");SubmitForm(EditForm1)

 

Instruction on the onselect function for the not working flow

'TBTCreatefile,Convertfile,Createfile2'.Run("<!DOCTYPE html>
<html>
   <head>
      <title>HTML Table</title>
   </head>
 
   <body>
      <table border = '1' width = '100%'>
         <thead>
            <tr><td>
               <img src=" & JSON(Image4.Image,JSONFormat.IgnoreBinaryData ) &" height='65' width='65'></td>
               <td  colspan = '3'><b>ToolBox Talk Ref. <b/> "& DataCardValue13.Text & " </td>
            </tr>
            <tr>
              
            </tr>
         </thead>
        
         <tfoot>
            <tr>
               <td colspan = '4'><b> <b/></td>
            </tr>
         </tfoot>
        
         <tbody>
            <tr>
               <td colspan = '4'><b>Delivered By:</b></td>
            </tr>
            <tr>
               <td colspan = '4'>"& DataCardValue11.Text &" </td>
            </tr>
            <tr>
               <td colspan = '4'><b>Contract</b></td>
            </tr>
            <tr>
               <td colspan = '4'>"& Dropdown2.Selected.Result &" </td>
            </tr>
            <tr>
               <td colspan = '4'><b>ToolBox Talk Ref:</b></td>
            </tr>
            <tr>
               <td colspan = '4'>"& DataCardValue13.Text &" </td>
            </tr>
            <tr>
               <td colspan = '4'><b>VToolBox Talk Date: <b/>"& DateValue1.SelectedDate &"</td>
            </tr>
             <tr>
               <td colspan = '4'><b>Subject:</b></td>
            </tr>
            <tr>
               <td colspan = '4'>"& DataCardValue14.Text &" </td>
            </tr>
            <tr>
               <td colspan = '4'><b>No. of Attendees:</b></td>
            </tr>
            <tr>
               <td colspan = '4'>"& DataCardValue12.Text &" </td>
            </tr>
            <tr>
               <td colspan = '4'><b>Attendees:</b></td>
            </tr>
            <tr>
               <td colspan = '4'>"& DataCardValue16.Text &" </td>
           <tr>
               <td colspan = '4'><img src=" & JSON(TakenPic, JSONFormat.IgnoreBinaryData ) &" height='800' width='800'></td>
             
            </tr>
         
 </tbody>
 
</html>");SubmitForm(EditForm1)
 
Can anyone sugest a solution or noticed any mistake?
Thanks
Copied Flow.JPG
Original Flow.JPG
Categories:
I have the same question (0)
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Mouraj,

    Based on the HTML Text and flow's configuration that you mentioned, I could not find any issue with it. I think the flow's configuration is correct.

    Do you mean that the generated HTML file in your OneDrive folder from your two flows are both OK?

     

    I have made a test on my side, and don't have the issue that you mentioned. Within your copied flow, please make sure the "File content" dynamic content within the File Content field of the "Create file 2" action is selected from above "Convert file" action.

     

    In addition, please consider modify the File Name of your PDF file as below:

    2.JPG

    Set "File Name" field in your "Create file 2" action to following:

    Vehicle_Defect_Report_@{utcNow()}.pdf

    Note: Remove the space within the File Name. Or you could rename it as a different name.

    Try above solution, check if the issue is solved.

     

    Also please consider remove the "Create file 2" action from your copied flow, and then re-add a new "Create file" action of OneDrive folder in your flow, specify the File Name as above, and select the converted File Content from above "Convert file" action, save your flow. Then fire the flow from your canvas app again, check if the issue is fixed.

    Note: Within your app, please make sure you have created a connection to your copied flow properly, and call the flow action through the copied flow connection rather than original one.

     

    Best regards,

  • Mouraj Profile Picture
    71 on at

    Unfortunately, it didn't work. I even try to create a new app on a different location with different destination and origin files but I have the same result. Good HTML files but blank PDF.  Can anyone suggest me another way to create the pdf file?

    Thanks

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 377 Most Valuable Professional

#2
11manish Profile Picture

11manish 165 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 110 Super User 2026 Season 2

Last 30 days Overall leaderboard