How to set default values in risk assessment form in change module

susmi99
Tera Contributor

Onload of risk assessment form need to set the default values.

8 REPLIES 8

Hi Kamlesh,

Could you please let me know if the field type = multiple selection,

how can i set the default value.

The solution is only applicable for field type = scale.

 

Awaiting for your response.

 

Thanks,

Amit Kumar

Its not working for me , can you please help I have the same requirement

Hi everyone,

 

I have the requirement where I have some document which needs to be present whenever the task is created based on the task type, how to achieve it.

Really useful information, thank you since the Documentation is not very clear. Here is another example script for anyone since most of the detail should be in the Change Request:

 

gs.info('ServiceOutage script started. primary sys_id: ' + primary);

var gr = new GlideRecord('change_request');
if (gr.get(primary)) {
    gs.info('change_request found for sys_id: ' + primary + ', u_outage_required: ' + gr.u_outage_required);
    u_outage = gr.u_outage_required;
    if (u_outage == 'Yes') {  
        scaled_result = '2';
    } else if (u_outage == 'No') {
        scaled_result = '1';
}

 

ConradJ_0-1747132353913.png