Generate PDF containing multiple records

chrisreidr
Tera Contributor

Need to create a UI action on a record that will export a PDF formatted with a cover page, containing each record within the current quarter (field value is boolean set to true on relevant records) from table_one. The general format requested is found below:

chrisreidr_0-1709328352627.png

 

 

 

If the table on the UI Action is table_one but I also need to grab seven other field values (field_value_two - field_value_eight) from seven other tables (table_two - table_eight) what script or APIs would I utilize in the UI action to generate a PDF where each page is a different record from table_one but with values from the other seven (maybe reference fields?) formatted like the example above?

 

Thinking of creating a new view on the table containing those fields and exporting it as a pdf via the URL but the only issue is the formatting wouldn't be correct.


Fairly new to this kind of functionality and there does not seem to be a lot of documentation. Looking for, conceptually, how to begin building this solution. Any helpful advice, APIs, script includes, OOB functionality, etc. are much appreciated.

3 REPLIES 3

Mark Manders
Mega Patron

What is the goal for the PDF's, because you already mentioned the best solution: create a form view with the data and export that. And no, the format won't be correct, but why is the format needed? How was this done before? Why do they need a PDF when they can just click into the system and see everything (and even more)?


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Hello, Mark. Thanks for the questions.

Admittedly, this PDF generation seems to be far from the most practical solution but the client essentially wants the process they had before, which was having other people manually fill in those fields then combined them into one PDF, automated. We proposed some more feasible solutions but it was stated "They are not ready for that". 

We have some similar functionality involving a UI Action that utilizes a script action, few script includes, and document revision table. However, even then the solution was generating individual PDFs for each record and compressing them into a zip file which wouldn't meet the requirements of the story.

It's much more work than I believe needs to be done but is it possible? And if so was hoping it may be a feasible solution.

Mark Manders
Mega Patron

I have seen it on some instances I no longer have access to, but 'we want the same as before we had ServiceNow' is a reason to not spend too much time on it. It just works differently. And all solutions I did see, were per record, so also not to your requirement. 

I would say: get the data on a dashboard and move away from paper. 


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark