Join us Dec. 16 for The Community Hour, our first global virtual User Group event!

How to check if an attachment on a record producer is empty or not on Service Portal

AmenaA
Giga Guru

REQUIREMENT: How to check if an attachment on a record producer is empty or not on Service Portal

 

Thanks In Advance

1 ACCEPTED SOLUTION

AmenaA
Giga Guru

Hide the OOB attachment (This option is present under the "Portal Settings" Tab)

Create an "Attachment" variable & use client script / UI policy to validate if attachment is filled in or not

View solution in original post

5 REPLIES 5

Keeps showing the alert message be 0 or 1 or more attachments on record producer, but for a catalog item works well.

Bhavani Shankar
Tera Guru

Hi @AmenaA,

 

A catalog client script something like this will tell you if attachment is added / selected.

g_form.getValue("<attachment_variable_name>"); //will return sys_id of attachment record

you can use the value returned from this and store it in a variable and use it in your conditional statement and per requirement. If attachment is not added this will not return anything.

 

If my response helped you, please do leave a thumbs up 👍

 

Regards,

Bhavani Shankar

 

Sumanth16
Mega Patron