List collector field to assign the configuration_item and insert task_ci records for sys_id.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2024 07:41 AM
Question:
if cmdb_cis list collector has only 1 sys_id put it into the field configuration_item
if cmdb_cis list collector has more than 1 sys_id, put the first into the field configuration_item
and create records to each sys_id in the table task_ci for the same RITM.
FYI: Using catalog item with list collector field: equipment_choice which has 3 choices.
I have created below "before" Business rule but no luck. Please help on to debug
BR:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2024 08:04 AM - edited 09-25-2024 08:06 AM
Is your BR running before Insert on the sc_req_item table? Are the RITM fields getting set from the variables? When you set the value of the configuration_item field, that record should be added as an Affected CI, so you might want to start your loop at i=1 if you are getting duplicates once this is working. I don't see anything glaring in your script. Add some more gs.info lines for troubleshooting so that you can confirm it is executing, and see how far the script is getting, the if conditions that are met, etc.