How to make field read only in ui page until value is not selected
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2025 04:32 AM
Hi All,
I want to make fields only read-only on the basis of selection of that the second filed become editable.
for example I created 3 fields 1. caller and 2. caller department and 3. call location.
Now I want caller department and caller location should be readonly until caller is selected how I can do that in ui page .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2025 06:31 AM
it's for UI page?
then do this
1) make the 2nd field readonly by default
2) have onchange event on 1st and if value is not empty then open the 2nd field
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2025 06:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2025 06:33 AM - edited 01-31-2025 06:51 AM
check this where I have shown how to have dependency on reference fields and enhance it for 3 fields
also check this link which says how to make it readonly and editable
making ui reference fields readonly or disabled
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2025 06:53 AM
I think you not get my requirement I want user need to select caller first in caller filed in ui page then those 2 fields should be editable other wise remain read only