Restrict choice field value on the basis of selected value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2025 06:06 AM
Hi,
I have a custom table on which there is a choice type field(workstatus)which has values as:
1- Available
2-Not Available
3-Approved
4-In progress
I want that when the workstatus is Available, the drop down should show only "Not Available", means only Not Available is allowed to select.
When the work status is In progress, it should only show Approved value in choice list.
I created a client script to do this but it only works on the form i.e., when the record is opened on the form.
But on the List view it displays all the choice values.
How to implement this? Please guide.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2025 06:11 AM
that's correct the onChange client script won't work in list.
Anyhow what sense it makes to hide the other option as it's a drop down, so only 1 choice can be selected at a time.
Please explain your business requirement in detail
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
‎05-14-2025 06:16 AM
Hi Ankur,
The requirement is that i want to restrict the visible choices in the workstatus dropdown so that users can only see the allowed transitions based on current status.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2025 08:29 PM
I don't think it's a valid business requirement.
I already explained the reason
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