Populate Configuration Item field on Catalog Task

Sandy7
Tera Expert

Hello, 

I have a service request that has a variable titled "computer_you_need_access_to"

On the Requested Item,  we have a field called "Configuration Item" (name is cmdb_ci) - that is an actual field on the top of the RITM. Then, on the catalog task there is also a field at the top called "Configuration Item" (cmdb_ci)

I have 2 requirements - one, once a service request is submitted, populate the cmdb_ci field on the RITM. I was able to accomplish this. 

The second requirement is to populate the cmdb field on the catalog task (from the value that the user entered on the service request form, which is already populated on the RITM). 

I am trying to do this using the "Advanced" field on the catalog task. 

I have tried all 3 of these variations below and none are working. Does anyone have any suggestions?

//task.cmdb_ci = current.variable_pool.cmdb_ci;
//cmdb_ci = computer_name_to_access;
//cmdb_ci = current.variable_pool.computer_name_to_access;
cmdb_ci = current.variable_pool.cmdb_ci;

1 ACCEPTED SOLUTION

Muhammad Khan
Mega Sage
Mega Sage

Hi Sandy,

 

Try this

task.cmdb_ci = current.variables.computer_you_need_access_to;

or

task.cmdb_ci = current.cmdb_ci;

 

Hopefully, this will work.

View solution in original post

7 REPLIES 7

Muhammad Khan
Mega Sage
Mega Sage

Hi Sandy,

 

Try this

task.cmdb_ci = current.variables.computer_you_need_access_to;

or

task.cmdb_ci = current.cmdb_ci;

 

Hopefully, this will work.

Thank you! that 2nd line worked!

Mujahid Sharief
Tera Contributor

Hello Sandy,

can you share us the script? How did you populate ci on ritm ans sc task both?

because i have the same requirement.

 

thank you.