how to hide the add attachments icon on service portal based on the variable choice

poornima batchu
Tera Expert

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...

8 REPLIES 8

Vishal Birajdar
Giga Sage

Hi @poornima batchu 

 

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.

 

VishalBirajdar_0-1696593772199.png

 

 

Vishal Birajdar
ServiceNow Developer

I know one thing, and that is that I know nothing.
- Socrates

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

LinkedIn

Hi @Mark Roethof 

 

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.

 

Vishal Birajdar
ServiceNow Developer

I know one thing, and that is that I know nothing.
- Socrates

RaghavSh
Kilo Patron

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