The CreatorCon Call for Content is officially open! Get started here.

Make Variables visible and mandatory after submit for people with specific roles

kailashthiyagar
Kilo Guru

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

1 ACCEPTED SOLUTION

I have done the changes. it is wrkg fine now.



Note: kindly change the password. Someone might mis use it.


Regards
Harish

View solution in original post

17 REPLIES 17

ServiceNow



Here is my personal instance...


User ID is admin



Catalog Item name : Test Catalog Item


Catalog client scripts name is "Test Client Scripts"


just paste the below code. it shud work



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);


  }


Regards
Harish

I m doing the same.. now i changed a bit but in the catalog item view, still the variable appears...


harishkumar



If you have access to my personal instance.. you can easily identify the issue. sorry to disturb.


you have to give me password as well


Regards
Harish