General InformationThis action rule is invoked when opening a session. The rule only runs once, and the values returned are retained the next time you open a session. Input ObjectsInput objects must be of the following type: Parameters correspond to the context object. ExampleThe following example describes the action rule for identical part attribute management. You can use this example to make another script in the action rule. For oTargetIdx:
For ioAttributeIdentifier:
let iTargetBOM(String)
let ioAttributeIdentifier(String)
let oTargetIdx(Integer)
//The user can define this value.
//But the return value must be 1(from EBOM) or 2(from MBOM)
set iTargetBOM = "EBOM"
//set iTargetBOM = "MBOM"
//Pre-definded attribute
set ioAttributeIdentifier = "V_StrPositionNumber"
set oTargetIdx = 1 //default
if(iTargetBOM == "EBOM")
{
set ioAttributeIdentifier = "V_StrPositionNumber"
set oTargetIdx = 1
}
else if(iTargetBOM == "MBOM")
{
set ioAttributeIdentifier = "V_description"
set oTargetIdx = 2
}
Parameters.SetAttributeInteger("TargetBOM", oTargetIdx)
Parameters.SetAttributeString("AttributeIdentifier", ioAttributeIdentifier)
| |||||||||||||||||