Generate PDF containing multiple records
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2024 01:14 PM - edited 03-01-2024 01:44 PM
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:
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2024 04:55 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2024 05:43 AM
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 as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2024 05:49 AM
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