hiding attachments

DreDay3000
Giga Guru

Is there a way to hide the attachments icon when a ritm is not assigned to the current user or the request has not been approved? And when the request is approved or assigned to the current user, the attachments icon should be visible? My current client script is not working correctly

 

DreDay3000_0-1718891761986.png

 

1 ACCEPTED SOLUTION

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

 

Cat Item is a reference field so use this for the cat item if condition

if(g_form.getValue('approval') !='approved' g_form.getDisplayBox('cat_item').value == 'Purchase Request')
g_form.disableAttachments();

 

-Anurag

View solution in original post

1 REPLY 1

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

 

Cat Item is a reference field so use this for the cat item if condition

if(g_form.getValue('approval') !='approved' g_form.getDisplayBox('cat_item').value == 'Purchase Request')
g_form.disableAttachments();

 

-Anurag