Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Power Automate HTML to PDF

Posted on by 372

I have flow like this,

Flow P.AutomateFlow P.Automate

 

and I have database like this, 

DatabaseDatabase

 

This is the detail of the flow,

Detail flowDetail flow

 

So, I want that HTML can grab all data based on 'Job No' from the database. When I choose, Job No A.23.3010, then the data on pdf just the data which has Job No A.23.3010. 

I try used formula No_x0020_Job eq '[TextInput2]' to call all data with that Job No. TextInput2 is the Job No control in PowerApps. But it cant work, can you help me to solve this problem? Thanks in advance.

  • Verified answer
    SudeepGhatakNZ Profile Picture
    SudeepGhatakNZ 14,123 on at
    Re: Power Automate HTML to PDF

    This is my list

    msedge_XlXPLclhuL.png

     

    This is my flow

    msedge_Dj4Q8funCS.png

    Final Output

    msedge_kvnnwNtwQ4.png

    The sample is attached.

     

     

  • firda59 Profile Picture
    firda59 372 on at
    Re: Power Automate HTML to PDF

    Yes, I need a sample, so I can follow the flow like what you explain to me. Thanks in advance

  • SudeepGhatakNZ Profile Picture
    SudeepGhatakNZ 14,123 on at
    Re: Power Automate HTML to PDF

    There are several things that don't look right.

    Intialize variable should be at the top of flow. It should be of type array.

    Use Append variable inside the loop.

    Use select and create HTML table actions to create the html

    Finally convert it to HTMl

    Do you need a sample?

  • firda59 Profile Picture
    firda59 372 on at
    Re: Power Automate HTML to PDF

    here it is

    firda59_0-1685082971050.png

    compose is contain HTML text table, and this is what I insert on variable

    firda59_1-1685083035151.png

    do you know whats wrong with this?

  • SudeepGhatakNZ Profile Picture
    SudeepGhatakNZ 14,123 on at
    Re: Power Automate HTML to PDF

    What are you setting inside the variable?

  • firda59 Profile Picture
    firda59 372 on at
    Re: Power Automate HTML to PDF

    Ok, thank you. And there's another problem. When I wanna save this flow, I got this:

     
    Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The inputs of template action 'Initialize_variable' at line '1 and column '8325' is invalid. Action 'Apply_to_each' must be a parent 'foreach' scope of action 'Initialize_variable' to be referenced by 'repeatItems' or 'items' functions.'.'

    firda59_0-1685082378201.png

    How to solve this problem?

  • SudeepGhatakNZ Profile Picture
    SudeepGhatakNZ 14,123 on at
    Re: Power Automate HTML to PDF

    If you are triggering the flow from PowerApps, you must be sending a parameter to it?

    How To Trigger A Power Automate Flow From PowerApps (c-sharpcorner.com)

     

  • firda59 Profile Picture
    firda59 372 on at
    Re: Power Automate HTML to PDF

    In my powerApps, there is no varText. How to bring it up? 

    Screenshot (37).png

     

  • SudeepGhatakNZ Profile Picture
    SudeepGhatakNZ 14,123 on at
    Re: Power Automate HTML to PDF

    SudeepGhatakNZ_0-1685071813307.png

     

  • firda59 Profile Picture
    firda59 372 on at
    Re: Power Automate HTML to PDF

    can you give me example for this 'Your PowerApps variable form the trigger'. I dont understand how to define this thing

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,591

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,090

Leaderboard