cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Toggsy
Frequent Visitor

Print A Screen Sequentially

Hi all,

To put it shortly:

  • I've built a screen in which certain fields from a sharepoint list are displayed in a print friendly format, essentially it's just a label for a box. 
  • In my gallery, there is a print option within the gallery itself - so when selecting, it will navigate to the print screen and the print formula will run in the OnVisible property of the print screen.

So currently - this means the user will have to print every single item within the gallery one by one. Is it possible to print items sequentially? 

Ie. - User selects a Print All button, this navigates to a print screen, which prints and then selects the next record, prints again, so on and so on until all available gallery items have been printed?

 

I've attempted to do this with a global variable which is:

Set(gblGlryID = MyGallery.Selected.ID) 

Then on the print screen - 

Print();

Set(gblGlryID, gblGlryID + 1);

Print();

Set(gblGlryID, gblGlryID + 1);

Print();

Set(gblGlryID, gblGlryID + 1);

etc (This is clearly not the correct way, it kind of works but isn't reliable as the data on the print screen doesn't have time to lookup through the sharepoint list to retrieve the new ID's data before a new print is actioned, resulting in the same data being printed multiple times).

 

I hope this makes sense, any help would be appreciated - super stuck!

1 ACCEPTED SOLUTION

Accepted Solutions
TheRobRush
Super User
Super User

The best thing for you to do in a situation where something like this is needed is to develop a flow in PowerAutomate that you can pass the information for all items you want printed from powerapps into powerautomate which can then (using compose > create > convert connectors) create pdfs for you

 

TheRobRush_0-1657920030970.png

 

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

View solution in original post

6 REPLIES 6
TheRobRush
Super User
Super User

The best thing for you to do in a situation where something like this is needed is to develop a flow in PowerAutomate that you can pass the information for all items you want printed from powerapps into powerautomate which can then (using compose > create > convert connectors) create pdfs for you

 

TheRobRush_0-1657920030970.png

 

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!
Toggsy
Frequent Visitor

Hi Rob - 

Thanks for the response - would something like this allow the end user to create all of the PDFs for records inside the gallery simultaneously with one click? 

 

I'd imagine if that's the case, the individual records are attached to the same PDF on different pages?

TheRobRush
Super User
Super User

Yes, and You could do it on sequential pages in one pdf, or a separate pdf for each. Doesn't really matter which, your choice.

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

I suppose my final question would be to how to design the PDF - would I be able to use my currently designed screen as a template?

 

I'm not too familiar with Power Automate, only basic stuff such as exporting a gallery's content to Excel and pushing the filelink to the end user. 

TheRobRush
Super User
Super User

No, you will have to design your pdf with html (you can see some of mine in the top of my screenshot in previous post) and then pass the variables into it to populate it. Its pretty annoying process getting it perfect, but you only have to do it once
_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

Thanks Rob - 

 

I'll give it a go - I'm not an expert in HTML so it'll take me quite a bit of time. Thank you! 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,313)