- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2017 09:02 AM
I m working on a service catalog item. I have a list of variables which i need to make visible and mandatory on submit for people with certain roles. How to do that using UI policy..
In the UI policy, i selected, "Applies on Requested Items" and removed "Applies on Item Catalog view" checkbox.
Added the UI action as "Visible" and "Mandatory" true
But it doesnt help
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2017 10:23 AM
I have done the changes. it is wrkg fine now.
Note: kindly change the password. Someone might mis use it.
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2017 09:19 AM
You need to uncheck the option Applies to catalog item view and it wont run on the form.
Thanks
Please Hit like, Helpful or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2017 09:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2017 09:21 AM
Hi Kailash,
Did you try the way I suggested in my last response? Please try that and let me know. The approach which I suggested will ensure that the script won't run on the Catalog Item form, rather on Requested Item and Catalog Task form. Also the script checks the logged in user's role as you have asked in your question.
Please let me know if you face problem after trying the same.
I hope this helps.Please mark correct/helpful based on impact

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2017 09:31 AM
the code if(!g_form.isNewRecord()) will hide the variable when you open the catalog form.use ! (NOT) before g_form
Harish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2017 09:22 AM
Use
if(!g_form.isNewRecord()) // instead of g_form.isNewrecord()
{
g_form.setDisplay('code_is_consistently_formatted',false);
}
else{
g_form.setDisplay('code_is_consistently_formatted',true);
}
Harish