- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
I have a variable named Purchase type which has like 4 values and when i select one value which is Refinery Request, then a bunch of variables which are declared under variable set MRVS, like Quantity, Asset number. They all should be made read only and non mandatory.
I tried to use UI policy but it is not working
Please suggest.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thursday
you can write onLoad catalog client script on MRVS and then use this logic
Note: I assume your purchase type variable is outside MRVS
function onLoad() {
var variableValue = g_service_catalog.parent.getValue("purchaseTypeVariableName");
// give correct value to compare here
if (variableValue == 'Refinery Request') {
// make your mrvs variables read only and non mandatory here
}
}
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
Wednesday
Hi @Abdul ,
create a client script and use to make it read only (add your conditions and use the below line)
g_form.setReadOnly('YOUR MVRS Internal Name')
In this example I'm making the mvrs readonly onload of the form
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thursday
if there are 11 variables in the variable set i need to make like 5 read only based on the selection of a normal variable outside the variable set can you please help me with that
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thursday
Hi @Abdul ,
Please go through the link mentioned in my first post, that will explain you what you can do and what will be the behaviour.
-------------------------------------------------------------------------------------------------
If my response points you in the right directions, please consider marking it as 'Helpful' & 'Correct'. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
Follow this article to implement your requirement,
If this helped to answer your query, please mark it helpful & accept the solution.
Thanks,
Bhuvan