There are two stages to setting up a dynamic window:
The two procedures below demonstrate how to make the Impact field on the Incident window mandatory if the Urgency field is completed. You use similar techniques for the other Window Functions. Further example calculations are given later.
We recommend that the names of your calculation attributes start with DynamicWindow, to make them easier to find in the designers.
static def GetAttributeValue(Incident):
Value = ":SetMandatory(_Impact, True);"
This example calculation is not one that you would use in a live system. Although it makes Impact mandatory if the Urgency field is completed, it does not handle resetting the field if the Urgency field is changed again later. This example is included only as part of demonstrating the procedures for setting up dynamic windows. The more complete calculation is described later.
The lines beginning with Value and return in the example above have a single indent. If you copy examples from here, make sure that the correct indentations are maintained when you paste them into the calculation editor.
:SetMandatory uses the attribute's name only. Do not include the object name (for example, do not use Incident._Impact). Remember that if the attribute was not a system attribute, it will begin with an underscore (for example, _Impact).
You can update multiple target attributes by separating them with semi-colons. For example:
Value = “:SetMandatory(attribute1,True);SetMandatory(attribute2,False);”
Now that you have created the calculation that sets the field to mandatory, you can set up the window to use it.
The attribute must be added to the window, but can be hidden by setting the ShowOnWindow property to False. We recommend that you set ShowOnWindow to True while you design and test the calculation.
When a user selects an Urgency on the Incident window, the calculation is triggered and the value of the calculated attribute is set to :SetMandatory(_Impact, True);. This then makes the Impact field become mandatory.
Copyright © 2019, Ivanti. All rights reserved.