- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2025 11:14 AM
On change Catalog item
variables string filed like : Field1 ,field11,filed2,field22,filed3,field33 there are six string filed .
and choice field : name : select value
choice value : none,0,1,2,3.
Scenario :
1.When i select none and 0 no one filed populate all the field need to hide .
2. Then If i selected choice value 1 the Field 1 and field11 this field need to visible and need to set mandatory rest of the fields need to Hide .
3.Then if i select choice value 2 then Field1 , field11 and filed2 , field22 these four field need to visible and set mandatory rest of the fields need to Hide .
4.Then if i select choice value 3 then Field1 , field11 and filed2 , field22 , field3 , field33 these six field need to visible and set mandatory for six field .
and main thing is these conditions are need to apply task view as well.
Note : if on change is not good practice the suggest any other method to archive this .
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2025 08:23 PM - edited 04-23-2025 08:34 PM
Hi @rajeshraji1
Create Catalog UI policies as below.
1. When Choice value is 1 or 2 or 3: In the Catalog UI policy action, add Field 1 and Field 11 (Make mandatory and Visible as true)
2. When Choice value is 2 or 3:In the Catalog UI policy action, add Field 2 and Field 22 (Make mandatory and Visible as true)
3. When choice value is 3: In the Catalog UI policy action, add Field 3 amd Field 33 (Make mandatory and Visible as true)
Sample UI policy:
In the Catalog UI policies check the below highlighted check boxes.
Hope this helps.
Regards,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2025 06:27 AM
what debugging did you perform with the client script I shared?
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