- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2024 09:19 PM
When I am trying to make a field (type- reference) mandatory and read-only, I am not able to do it. It is only possible if I change the mandatory action to leave alone.
Never I have seen this behaviour, why is it not working.
The below screenshots shows how the field is read-only when mandatory is 'leave alone'.
The below screenshots for mandatory changed to true in UI policy action.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2024 09:33 PM
Making a field mandatory means the user must select or enter a value before submitting the form. However, if the value is automatically populated based on another field, making the field read-only is sufficient. In this case, marking the field as mandatory doesn't make sense, as the value is pre-filled and cannot be changed by the user. Setting it to read-only ensures the value remains fixed and cannot be modified.
Regards,
Pradeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2024 09:25 PM
Hi @Taaha M ,
You can not make mandatory field read only if value is empty.
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2024 09:27 PM
it is getting auto-populated based on responses on another field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2024 09:25 PM
Hi @Taaha M ,
May I know what is the business use case here? because how the user will save/submit the form when a field is mandatory and read-only at same time.
Thanks,
Pradeep
Regards,
Pradeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2024 09:26 PM
I am autopopulating a field based on response on another field.