Attachment Mandatory in catalog item with condtion

Sirri
Tera Guru

Hi All,

 

In the catalog item  variable is Risk Owner (risk_owner) it's type is Reference(sys_user).

 

when we select any user. If that user grade is less than Director at that time only Attachment want to be mandatory.

Note: Grade(single Line text) is column from user(sys_user) table.

 

please see attachment for your reference. when I select that user only  at that time only attachment mandatory.

 

 

1 REPLY 1

Satyapriya
Mega Sage

Hi @Sirri,

 You can write an onchange client script for that By using the GlideAjax() you can fetch the server side value like 

if the current user has grade value less than the director then you can write in the client script like 

if(answer==true && this.document.getElementByClassName('get-attachment').length == 0){

g_form.addErrorMessage('Attachment is mandatory');

}

Please Mark it as solution or helpful if this is helpful for you.

Regards,

Satyapriya