How to set variables field both as mandatory and readonly

Shweta Kasbe1
Tera Contributor

How to set variables field both as mandatory and readonly.

1 ACCEPTED SOLUTION

Rekha Esadkar
Tera Expert

Hi Shweta,

 

You can do this using ui policy (if service catalog then catalog ui policy)But It will set only mandatory variable not readonly.But their is no point to make both readonly and mandatory at once.

I applied to one variable please check SS

find_real_file.png

and the result is 

find_real_file.pngIIf my answer helped you in any way, please then mark it as helpful.

View solution in original post

6 REPLIES 6

Mark Roethof
Tera Patron
Tera Patron

Hi there,

If a field is empty, though read-only, how can it be mandatory? What you are asking sounds a bit contradictory.

Can you explain your functional case?

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020, 2021 ServiceNow Community MVP
2020, 2021 ServiceNow Developer MVP

---

LinkedIn
Community article, blog, video list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Rekha Esadkar
Tera Expert

Hi Shweta,

 

You can do this using ui policy (if service catalog then catalog ui policy)But It will set only mandatory variable not readonly.But their is no point to make both readonly and mandatory at once.

I applied to one variable please check SS

find_real_file.png

and the result is 

find_real_file.pngIIf my answer helped you in any way, please then mark it as helpful.

I think it is possible that a field could be mandatory and readonly. For example in the image you shared , the field Requested for is mandatory and read only at the same  time. It is functional because it is autopopulated by a value. I think the requirement is somthing like that. 

 

 

Yes, May be