Requirement to make "Add Attachment" un mandate based on the option selected in catalog item

phr
Tera Contributor

Hi All,

 

I have a requirement to make "Add Attachments" field not mandatory based on the selection of the variable options.

For the below highlighted option , the Add attachment field should be not mandatory and for the other two options it has to be mandatory. As of now its mandatory for all options.

How to achieve this ?

phr_0-1716825757505.png

phr_1-1716825777299.png

(Note: Tried this via UI Policy, but the "Add attachment" field isn't visible )

 

 

7 REPLIES 7

Kieran Anson
Kilo Patron

There isn't an OOB way to do this. If you conditionally need an attachment, perhaps use the 'Attachment' variable rather than the item-level 'add attachments' option

phr
Tera Contributor

Hi @Kieran Anson 

 

I did search for Type "Attachment" but seems like it isn't present.

phr_0-1716889028037.png

 

 

 

HrishabhKumar
Kilo Sage

Hi @phr , I believe you are using the default out of the box attachment field and you have set "Mandatory Attachment" field as true, in maintain item definition.

Simplest solution would be as follows:

1) hide the out of the box attachment field.

    hide.PNG

 

2) Create an attachment type variable.

3) Use UI Policy, Custom created attachment variable will be available in UI Policy and Action.