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

SN_Learn
Kilo Patron
Kilo Patron

Hi @AmenaA ,

 

Please check the below:

Attachment Mandatory with message if attachment isnt provided 

check if an attachment has been added 

Possible Ways for Making an Attachment Mandatory : Service Portal/Native UI 

Service Portal Catalog Items: Hide Attachment / Mandatory Attachment [Madrid] 

 

----------------------------------------------------------------
Mark this as Helpful / Accept the Solution if this helps.

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

 

Regards,
Bhavani Shankar
Linked In

Sumanth16
Kilo Patron