Need to make Rich Text label as Mandatory

divyadhanda
Tera Contributor

Need to make Rich Text label as Mandatory in the catalog item and user uploads the file via Add an attachment , then mandatory mark should be removed. I know this can be done OOB, but i just wanted to know if there is any way to do this,

divyadhanda_0-1761733892260.png

 

3 REPLIES 3

divyadhanda
Tera Contributor

**This cant be done OOB

kaushal_snow
Giga Sage

@divyadhanda ,

 

It’s not directly possible to mark a variable of type Rich Text Label as mandatory because that variable type is intended only for displaying formatted content (and not receiving user input), what you can instead do is use a variable type like HTML or Rich Text (which accepts user input) and then apply a Catalog UI Policy or a Client Script that sets that variable mandatory when no attachment is uploaded, and clears the mandatory flag once the Add an attachment step is completed, thereby achieving the behavior you’re looking for....

 

If you found my response helpful, please mark it as ‘Accept as Solution’ and ‘Helpful’. This helps other community members find the right answer more easily and supports the community.

 

Thanks and Regards,
Kaushal Kumar Jha - ServiceNow Consultant - Lets connect on Linkedin: https://www.linkedin.com/in/kaushalkrjha/

Ankur Bawiskar
Tera Patron
Tera Patron

@divyadhanda 

Rich Text label simply shows information and doesn't accept any input.

what's your exact business requirement? share complete details and screenshots.

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader