how to hide the add attachments icon on service portal based on the variable choice
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2023 04:42 AM
Hi all ,
How can I hide the add attachments icon on service portal specifically when user selects partiular choice of a variable instead of hiding it for entire catalog item..
I created a Catalog item called management..and I have field called subcategory which is a reference type of subcategory table..if the user selects one particular value the add attachments icon should hide..and for rest of the value it should display...
Is this possible? if yes...Please help me with the solution....
I was trying to make this add attachments not mandatory based on selected value but it is not working for me....
So, I'm trying to hide add attachments icon based on the selected choice valuee...
Please help...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2023 05:03 AM
There is one alternative way is to do that without DOM manipulation (not recommended) by Hiding the OOTB attachment icon & add new Attachment variable in catalog item.
You can do UI policy on that attachment variable to hide or show.
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2023 05:05 AM
Indeed thats the variable I was mentioning. Do be aware: DON'T make it mandatory, that would conflict with your UI Policies.
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2023 05:09 AM - edited 10-06-2023 05:11 AM
Thanks for this suggestion...!!
The snapshot captured is from my PDI one....!! can ignore it..!!
Indeed..!! Use UI policy to make it mandatory/non-mandatory.
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2023 05:13 AM
As suggested by others it is possible via not recommended ways.
To tackle this SN came up with attachment variable.
1. You can hide attachment icon (at top) in portal using "Hide attachment" check box on sc_cat_item table under "Portal settings."
2. Create "attachment" variable to handle your attachment. This attachment variable will be responsive to your catalog UI policies and client scripts.
Please mark the answer correct/helpful accordingly.
Raghav
MVP 2023