General InformationThis opening ID is a compute opening. For more information about the specificities of a compute opening, see Compute Openings. It is triggered when a user clicks a New ... or Insert
New... command, after the The dialog box is displayed according to the changes defined in the script.
Input Objects
Context Object Parameters
ExamplesThis example shows how to make the Description property read-only: Trace(1,"Inside compute_new_init")
if (ThisObject.HasAttributeProperty("PLMEntity.V_description","ReadOnly") == true){
ThisObject.SetUIAttributeReadOnly("PLMEntity.V_description", true)
}
This example shows how to remove the Description property from the New ... dialog box: On creation dialog, when Description field is removed from UI.
**
Trace(1,"Inside compute_new_init")
if (ThisObject.HasAttributeProperty("PLMEntity.V_description","Visibility") == true){
ThisObject.SetUIAttributeVisible("PLMEntity.V_description", false)
}
This example shows how to restrict the Description property to a list of authorized values ("alpha", "beta", and "gamma"): Let authvalueForDesc(List)
Trace(1,"Inside compute_new_init")
if (ThisObject.HasAttributeProperty("PLMEntity.V_description","AuthorizedValues") == true){
authvalueForDesc.Append("alpha")
authvalueForDesc.Append("beta")
authvalueForDesc.Append("gamma")
ThisObject.SetUIAttributeAuthorizedValue("PLMEntity.V_description", authvalueForDesc)
}
| |||||||||||||||||||||||||