Before you can set up the value types to populate the required fields on the Child Requests, you need to populate the Bundle attribute on the Parent Request.
We are going to populate the Bundle field on the Request window. This is not usually needed on the Request window, so you might need to add it temporarily using Window Manager. To access Window Manager for the Request window, right-click the new Populate Bundle Attribute automatic action, then click Modify Action Window.
You can remove the Bundle field from the Request window when you have completed this procedure.
import System static def GetAttributeValue(Request): Value = null if Request._ConfigItemRequested != null: if Request._ConfigItemRequested.Class.Name == "Bundle": Value = Request._ConfigItemRequested return Value
Lines 3 and 4 of this calculation are indented once; line 5 is indented twice; line 6 is indented three times; and the final line is not indented.
This calculation sets the value of the Bundle field to the value selected in the Service Item field on the Request window, if the Service Item selected is a bundle.
This calculation works by setting the value of the Bundle field to null (empty). Then, if the value of the ConfigItemRequested field on the Request is not null, it checks to see if the Name of the Class for the ConfigItemRequested field is set to Bundle. If it is, this means that the ConfigItemRequested is a bundle (the ConfigItemRequested is stored in the Service Item field on the Request window).
If the calculation determines that the ConfigItemRequested selected is a bundle, then the calculation sets the value of the Bundle field to be the value selected in the Service Item field on the Request window.
Copyright © 2018, Ivanti. All rights reserved.