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

Make variables mandatory in Requested Item- RITM

Balaji Munusamy
Tera Contributor

In Service catalog we have variable 'Region' , based on the region selected in service catalog ,Assignment group  populated in Requested Item - RITM.

If the assignment group is 'XYZ' then the variable 'Query' in the RITM should be mandatory.

How to do this?

@Ankur Bawiskar @Community Alums 

2 REPLIES 2

Sandeep Rajput
Tera Patron
Tera Patron

@Balaji Munusamy Create a UI Policy on your Catalog item as follows.

Screenshot 2023-10-04 at 11.54.50 PM.png

Screenshot 2023-10-04 at 11.56.10 PM.png

Chandresh Tiwa2
Mega Guru

Hi,

 

You can create an OnLoad catalog client script that runs on sc_req_item table and runs only on requested item view. 

function onLoad() {
   if(g_form.getValue('assignment_group')=='SYSID of Group')
   {
    g_form.setMandatory('variable_name',true);
   }

Assignment group should be available on the sc_req_item so that getValue method works fine.