Populate RITMs with Configuration Item

michaellshively
Mega Expert

I've been running live in ServiceNow (Geneva) for a few months now. One major mistake I made in the very beginning was that my Catalog Items are not recording a Configuration Item on the RITMs. Obviously this is a major problem when it comes to reporting on the type of work being submitted for each configuration item.

Now my task is to figure out a way to populate each of these RITMs (going forward, not the ones already submitted) with a configuration item.

I'm looking for some guidance on the best way to do this but I think I have an idea.

Would it be acceptable to add a new variable (variable set? so it's reusable?) to each of the Catalog Items and call it "var_My_ConfigItem".

Then I think I need to update the workflows used by these configuration items to record this information on the RITM.

Unfortunately, this is still a bit out of reach for me with my limited experience on the platform.

Any guidance is greatly appreciated!

Thanks all!

M

1 ACCEPTED SOLUTION

Abhinay Erra
Giga Sage

Hi Michael,



      You can create a variable which references cmdb_ci table and in the workflow add Run script activity and use this line in the script section to set the configuration item on request item


current.configuration_item=current.variables.<variable name>;


View solution in original post

5 REPLIES 5

Abhinay Erra
Giga Sage

Hi Michael,



      You can create a variable which references cmdb_ci table and in the workflow add Run script activity and use this line in the script section to set the configuration item on request item


current.configuration_item=current.variables.<variable name>;


YES! Almost there - Thank you Abhinay.


One thing left to do to make this all work....


I would like to set the value of the variable and make the variable read-only (only on this particular catalog item) so the end user cannot change it.


The key here is that each of my Catalog Items will reuse this variable (variable set) so I cannot simply set a default value. I think I need to do this in the catalog item Client Script.


Thanks again,


M


Yes it would be an onLoad client script. What value you want to set the variable to? or you just want to make this readonly after submission?


For the first catalog item I need to set the value to "PeopleSoft".


For the second catalog Item I need to set it to "Oracle".


...and so on and so on...


I think I can make it read only with a UI Policy on the Catalog Item. Not sure how to set the initial value in the OnLoad script though.