- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2024 04:21 AM
In a variable set i have four fields ItemA (reference), ItemB, ItemC and Quantity.
my requirement is need to make quantity field read-only, when the other fields are empty and editable when other three fields are not empty.
Give me catalog UI policy script to achieve this requirement.
Thanks in Advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2024 04:39 AM
Hi @venkatanathansp ,
No need to write script for this you can configure it like below. Select your ItemA,B and C.
And if you want script then use can do below.
Note: Do either script or action but not both.
-------------------------------------------------------------------------
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-06-2024 04:54 AM
Hello @venkatanathansp
This can be achieved just by configuring and doesn't need scripting.
Please refer the attached screenshots for your reference.
Screenshot1: Make quantity editable
Screenshot2: Make quantity read only
Preview of result:
"If you found my answer helpful, please give it a like and mark it as the accepted solution. It helps others find the solution more easily and supports the community!"
Thank You
Juhi Poddar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2024 04:39 AM
Hi @venkatanathansp ,
No need to write script for this you can configure it like below. Select your ItemA,B and C.
And if you want script then use can do below.
Note: Do either script or action but not both.
-------------------------------------------------------------------------
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-06-2024 04:54 AM
Hello @venkatanathansp
This can be achieved just by configuring and doesn't need scripting.
Please refer the attached screenshots for your reference.
Screenshot1: Make quantity editable
Screenshot2: Make quantity read only
Preview of result:
"If you found my answer helpful, please give it a like and mark it as the accepted solution. It helps others find the solution more easily and supports the community!"
Thank You
Juhi Poddar