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

Submit and Print Data from Form

Hello Everyone,


I currently have a form for quality assurancesurvey form, this form is pretty simple with just radio buttons and a rating scale.

 

Screens and contents:
BrowseSceen1 - BrowseGallery1
DetailsScreen1 - DetailFrom1

  • Last Name_DataCard1
    • DataCardValue1
    • DataCardKey1
  • Supervisor Full Name_DataCard2
    • DataCardValue79
    • DataCardKey90
  • ENV_AVG_DataCard1
    • DataCardValue26
    • DataCardKey26

EditScreen1 - EditForm1

 

I would like to configure my submit button to submit and print the information as a PDF (and ideally email it to the surveyee). Currently I'm trying to the data to populate from DetailsScreen1 using an htmltext box however I can only get it to work if I use BrowseGallery1.allitems. The code I'm using is listed below.

"<!DOCTYPE html>
<html>
<head>
<style>
table {
    font-family: arial, sans-serif;
    border-collapse: collapse;
    width: 100%;
}

td, th {
    border: 1px solid #dddddd;
    text-align: left;
    padding: 8px;
}

tr:nth-child(even) {
    background-color: #dddddd;
}
</style>
</head>
<body>

<h2>Quality Assurance Report</h2>
<table>"& 
Concat(BrowseGallery1.AllItems,"<tr><td>"& DataCardValue1 & "</td><td>" & DataCardValue79 & "</td><td>" & 'Created By'.DisplayName & "</td><td>" & DataCardValue26 & "</td></tr>")
&"
</table>
</body>
</html>
"


To submit & Print PDF I'm assuming the function OnSelect would be "SubmitForm(EditForm1) & MakePDF.Run(PDFExport.HtmlText, "Record Number - " & Gallery1.Selected.ID)"

Make.PDF is on Flow

Please let me know if you need additional documentation.

 

3 REPLIES 3
Super User
Super User

Re: Submit and Print Data from Form

You are correct that it is not possible to print directly from PowerApps, although work on a print feature has started (no ETA as of yet although I heard it may be coming later this year...

 

You are on the right track using Flow.  Although they did not create it as a PDF, this is one of the best writeups I have seen with regards to printing via Flow.  https://centricconsulting.com/blog/how-to-print-form-powerapps_portal/   As you can see in this article, it is very easy to send as an email, or save to OneDrive.

jesus1
Level: Powered On

Re: Submit and Print Data from Form

@LRVinNC This helped a lot to gear me in the right direction.

I now have my PDF formated correctly. I'm just running into a problem with sending an email to a variable.


I would like to have a field where the user filling out the form could input an email, and after the form is completed the form gets sent to that email, and ccs a couple other emails.

Can someone guide me in the right direction for creating a email based of a datafield?

Super User
Super User

Re: Submit and Print Data from Form

You can pass a variable to your Flow when you invoke it.  So you could add a text data entry field in your app that collects the email address and then send it to the flow.  Here's an excerpt from one of mine which does this.

Here's the page that collects the info including the email address -- note the comment tells the user how to send more than one email address... 

Email1.jpg

 

And here's where it is used in the flow...

Email2.jpg

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, September 18th at 8am PDT

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 49 members 4,577 guests
Please welcome our newest community members: