I want to update affected_ci in the realted list of RITM table to get updated as per catalog variables && configuration item field on RITM form.

Kingstan M
Kilo Sage

Hello SNC,

I am trying to update affected_ci in the related list of RITM table to get updated as per catalog variables >> server.

configuration item field on RITM form takes the value from variable by simple onLoad script but setting up affected_ci is being a challenge.

Any advice?

function onLoad() {
    //Type appropriate comment here, and begin script below

    // >> topic >> set configuration_item field name value same as server variable
    var ciVariable = g_form.getValue('server');
    g_form.setValue('configuration_item', ciVariable);

}

How i can achieve this via client onLoad script? or by any method.

find_real_file.png

find_real_file.png

find_real_file.png

1 ACCEPTED SOLUTION

Vasantharajan N
Giga Sage
Giga Sage

You can use Before insert Business Rule on sc_req_item table and add the line in advanced script section

current.cmdb_ci - current.variables.catalog_variable_name_hold_ci;


Thanks & Regards,
Vasanth

View solution in original post

5 REPLIES 5

@Kingstan M 

I believe your question was how to populate the Affected CI related list with the variable Server and show it on RITM form

Did you check my script for that?

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader