cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Bub
Helper I
Helper I

Sharing Output from PowerApps

Greetings Everyone 😉

 

I have a powerapps app which I'm working on (steep learning curve as I'm a total newbie at this)...

 

It has literally dozens (around 50) of Yes/No dropdowns as it's basically a type of audit. It also has a load of other information about who completed it, which site it was based on etc. etc.

 

I'd estimate there are perhaps 100 pieces of information which are collected. This bit all works and ultimately puts the data into a onedrive spreadsheet. Once all of the info is captured the 'auditor' hits the submit button, onedrive is updated and the app is reset to blank entries.

 

Here's the question .... Ideally I want to dump 4 (our of 😎 whole pages of the app into a pdf and email it out. I know this isn't possible in powerapps 'at the moment'. So how do I best share the results of the completed audit with the recipients who need to see it?

 

I've tried the create html / save to onedrive / convert file to pdf route but with so many individual pieces of information this is a nightmare to do. It's just not practical to pass 100 variables into power automate. The flow would be a mile long.

 

Is there another route? I've searched but can't find anything although I feel sure I'm not the first person to ask this.

 

Thank you for reading & have a great day!

2 ACCEPTED SOLUTIONS

Accepted Solutions
Adrian_Celis
Responsive Resident
Responsive Resident

Hi @Bub 

The HTML and CSS that you are looking for should be possible. But then you have to re write that a little bit as CSS classes do not work in PowerApps, so you have to do it inline style.

 

Instead of doing it like this:

"<style>
div.repstyle{
font-family: Arial;
font-size: 14px;
}
</style>

<div class='repstyle'>
<p>Hello World.</p></div>"

You should do it like this:

"
<div style='font-family: Arial;font-size: 14px;'>
<p>Hello World.</p></div>
"

 

View solution in original post

Hi @Bub ,

I cannot go through all of that , however the fundamental issues are: -

  • All "inside" quotes need to be single quotes '
  • The whole thing needs to be contained in double quotes "
  • You can drop the <html> tags off the top and bottom and the doctype off the top.
  • A lot of that formatting probably will not work, particularly the class and CSS styles.
  • Keep it simple - although the HTML Text control in Power Apps is a bit forgiving for things like missing closing/mismatched tags, the HTML to PDF converter in OneDrive is not. I keep mine to a basic table structure with a colour fill in the heading. 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

10 REPLIES 10
WarrenBelz
Super User III
Super User III

Hi @Bub ,

You can export to CSV using a Flow (here is a good video from Shane Young @Shanescows on the process.

This than then be emailed as an attachment in the same Flow.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Adrian_Celis
Responsive Resident
Responsive Resident

Hi @Bub 

 

I think you are on the right direction with the power automate -> create html -> convert into pdf route but you don't have to pass 100 variables into power automate. What you need to do is to create the HTML inside of PowerApps (yes it may be long knowing that you have a large form) and you only have to pass that one HTML into your flow.

Hi @Adrian_Celis & @WarrenBelz. Thank you for your replies.

 

I think creating the html in powerapps and sending the whole thing to power automate is probably best in my case.

 

However, whatever I do in the htmltext box causes error - particularly if this includes any " marks - which table definitions and css / styles invairably do. Is there an easy way to create the html which won't cause issues?

 

I've tried putting double quotes etc to no avail. I do need some formatting in the html otherwise it'll look terrible.

 

Thanks again.

Hi @Bub ,

Can you please supply your HTML code in Text. Also it is best to test it in a HTML box and then simply send the box as the content of the HTML file you create in the Flow.

Adrian_Celis
Responsive Resident
Responsive Resident

Hi @Bub 

 

In PowerApps, just replace all double quotes in your HTML code with single quotes and it should work fine. Like @WarrenBelz said, please provide the HTML code if you need further assistance.

Hi. Here is the link to the code which I can't reproduce in powerapps from W3 Schools:

 

https://www.w3schools.com/code/tryit.asp?filename=GRQ1YC0445ZI 

 

Capture.PNG

No matter what I do (double quotes, single quotes, concat, & etc etc) powerapps rejects it as full or errors.

 

I need to include the variables shown in the tables from P/A too.

 

Obviously I'm doing something either dumb or not possible.

 

Kind regards from the UK 😉

 

@Bub ,

That does not really help - to assist you I need your actual code that does not work (in Text)

Adrian_Celis
Responsive Resident
Responsive Resident

Hi @Bub 

The HTML and CSS that you are looking for should be possible. But then you have to re write that a little bit as CSS classes do not work in PowerApps, so you have to do it inline style.

 

Instead of doing it like this:

"<style>
div.repstyle{
font-family: Arial;
font-size: 14px;
}
</style>

<div class='repstyle'>
<p>Hello World.</p></div>"

You should do it like this:

"
<div style='font-family: Arial;font-size: 14px;'>
<p>Hello World.</p></div>
"

 

View solution in original post

Hi @Bub ,

I cannot go through all of that , however the fundamental issues are: -

  • All "inside" quotes need to be single quotes '
  • The whole thing needs to be contained in double quotes "
  • You can drop the <html> tags off the top and bottom and the doctype off the top.
  • A lot of that formatting probably will not work, particularly the class and CSS styles.
  • Keep it simple - although the HTML Text control in Power Apps is a bit forgiving for things like missing closing/mismatched tags, the HTML to PDF converter in OneDrive is not. I keep mine to a basic table structure with a colour fill in the heading. 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (2,035)