How to map fields on Service catalog form to fields on CMDB table

GUSNOW13
Tera Contributor

I have a request where i have created few fields on the service catalog form. This is not a record producer and it is a pure catalog form. Now the request is to map few fields on the form with fields on CMDB batch job table. Most of the fields on the form are Sla details and have Application service name field also. Now i have to map the fields as below

Application service name(Source) -   Name(Target Field)

SLA Range -  u_sla_range(target field)

SLA Details - u_sla_details(target field)

So on like this few more fields. I have to store all this variable details in cmdb_ci_batch_job table. How to achieve this mapping of fields. And if already same CI item exists in the table only necessary details should get updated instead of again inserting CI details. How to achieve this. Please help me with script.

 

 

1 REPLY 1

Uncle Rob
Kilo Patron

The first order of business is finding the record you want to update with those values.  A Service Catalog Item always creates a Request, RITM, and SC_Task, so you aren't "Mapping to CMDB batch job table", you need to map to *A* record *IN* that table.


So if you're using Legacy Workflow, you use a Run Script activity to both (1) Find the record you actually want to update and (2) update its fields with the values in your variables.  You'll do this all manually via javascript.

If you're using Flow Designer there's a little less javascript, but you still need to look up the record you actually want to update.  Then you use the Update Record activity to (again) manually map the fields based on variable data you're getting from the Catalog Item.