Attachment Mandatory in catalog item with condtion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2023 02:43 PM - edited 10-13-2023 02:51 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2023 03:03 AM
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