UI Policy not working on RITM

Luis Roman1
Tera Contributor

I have the following UI Policy configure for a catalog item. However, when I go to the RITM after generating the catalog item they do not apply or work. If select "classified" all the choices are display instead of the on that are in the policy. Help or education appreciated.

 

LuisRoman1_0-1672956772273.png

LuisRoman1_1-1672956844749.png

LuisRoman1_2-1672956892300.png

 

 

 

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Yes @Luis Roman1 , the catalog client script will be applicable to the RITM or SCTASK generated by the catalog item. Following is the screen shot of the options you have choose to make it work in RITM and SCTASK. With the requirement, you have posted, you can use on change catalog client script, put your code in the on change function. Make sure you tick Applies to requested item and Catalog task.

 

GaganKris_0-1672960652681.png

 

Please mark helpful/Like, if the solution is in line with your expectation.

 

Regards,

Gagan k

View solution in original post

13 REPLIES 13

Kris as you requested, the code is below.  Thank you for the continuous help and education.

function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
if (newValue == 'c') {
/* AREA ACCES */
g_form.removeOption('area_access','open');
g_form.removeOption('area_access','protected');
g_form.addOption('area_access','closed','Closed',1);
g_form.addOption('area_access','restricted','Restricted',2);
/* NETWORK TYPE */
g_form.removeOption('network_type','lmi');
g_form.removeOption('network_type','isolated');
g_form.removeOption('network_type','private');
g_form.removeOption('network_type','extranet_lmi');
g_form.removeOption('network_type','extranet_no_lmi');
g_form.removeOption('network_type','iiot_isolated_lmi');
g_form.removeOption('network_type','guest');
g_form.removeOption('network_type','cloud');
g_form.removeOption('network_type','standalone');
g_form.addOption('network_type','classified','Classified Network',1);
g_form.addOption('network_type','standalone','Standalone (No Connectivity)', 2);
/* CLEAR AREA ACCESS | NETWORK_TYPE */
g_form.setValue('area_access','');
g_form.setValue('network_type','');
} else if (newValue == 'u') {
/* AREA ACCES */
g_form.removeOption('area_access','restricted');
g_form.removeOption('area_access','closed');
g_form.removeOption('area_acees','protected');
g_form.removeOption('area_access','open');
g_form.addOption('area_access','closed','Closed',1);
g_form.addOption('area_access','protected','Protected',2);
g_form.addOption('area_access','open','Open',3);
//* NETWORK TYPE *//
g_form.addOption('network_type','lmi','Lockheed Martin Intranet (LMI)');
g_form.addOption('network_type','isolated','Isolated LAN - with LMI Connection');
g_form.addOption('network_type','private','Private Network - Isolated LAN (No LMI)');
g_form.addOption('network_type','extranet_lmi','Extranet - with LMI connection');
g_form.addOption('network_type','extranet_no_lmi','Extranet - No LMI connection');
g_form.addOption('network_type','iiot_isolated_lmi','IIoT Isolated LAN - with LMI connection');
g_form.addOption('network_type','guest','Guest Network');
g_form.addOption('network_type','cloud','Cloud');
g_form.removeOption('network_type','classified');

/* CLEAR AREA ACCESS | NETWORK_TYPE */
g_form.setValue('area_access','');
g_form.setValue('network_type','');
}
}

Community Alums
Not applicable

Hi @Luis Roman1 ,

 

Thanks for sharing the code. However, I am not sure what is the challenge you are facing. As I understood, whatever, options you have added in the script, it is not visible in RITM and SCTASK, correct?, If it is your current issue, could you please share what is the different option you are able view in SCTASK and RITM.

The above snippet does not meet the requirement to display the correct choices. However, I review the above code and make some changes and it is working.  Your recommendation of changing the UI Policy to a client script was the key for the solution. Thank you for patience and your collaboration.

Community Alums
Not applicable

@Luis Roman1  Glad the solution worked for you. All the best and keep learning!!

 

Regards,

Gagan k