Document Template Advanced Scripting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2023 08:12 AM
Hello, I have a Form That needs to be filled out by multiple users. My goal also with the form is to make sure that the data that we already have is prepopulated on the form. So far I have all of the data being prepopulated. I am running into the issue of checking the box on the form. I am using scripting to set the scripting to checked. It seems that the box gets checked because when I download the form while user opens it to fill out it shows that the box is checked but the ServiceNow UI is not showing that. Please assist if you have any Ideas.
I have posted picture of my script that checks the box and the box being checked after download.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2023 08:46 AM
Hi @mlamin this is most likely due to the PDF itself is looking for a different value than "Yes" which is common. When you open the PDF itself in Adobe Designer, or another PDF editing app, you will see the values to which the field is looking for to set the box to selected. Most likely the PDF is looking for a value of true, but you will have to verify on the PDF itself. Try this and let us know the outcome.
Regards,
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2023 06:50 AM
Hello @michaelj_sherid, I looked at the PDF on a PDF editing app and the default option (Export Value) is "Yes" Which is why I think in the image I attached when I download the prefilled form, the PDF recognizes the value and puts and fills out the box. The script is correct and the field is being populated, I am just not sure how to get ServiceNow to see that value and fill in that spot. For other parts of the form that require- text, I can prepopulate them and they are displayed. This is only for the checkbox that I cannot get it to displayed, even though the value is true in the backend.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2023 11:12 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2023 10:24 PM
@mlamin In your script, please replace 'Yes' with 'true' and see if it checks the checkbox.