Example: Changing Field Properties when a Field Changes
This example demonstrates how you can change the properties of a field when a different field is changed.
In this example, if the status of the defect(BG_STATUS) is changed to Closed, the user must provide a value in the field Closed in Build (BG_CLOSING_VERSION).
Add the code to the Bug_FieldChange event procedure, to make the Closed in Build field a required field if the status is changed to Closed.
Sub Bug_FieldChange(FieldName) OnErrorResumeNext If FieldName= "BG_STATUS"then If Bug_Fields("BG_STATUS").value="Closed"then Bug_Fields("BG_CLOSING_VERSION").IsRequired=True Else Bug_Fields("BG_CLOSING_VERSION").IsRequired=False EndIf Else ' Enter your code here. EndIf PrintError "Bug_FieldChange" OnErrorGoTo 0 EndSub
functionBug_FieldChange(fieldName) { if (fieldName == "BG_STATUS") { if (Bug_Fields("BG_STATUS").Value == "Closed") { Bug_Fields("BG_CLOSING_VERSION").IsRequired=true; } else { Bug_Fields("BG_CLOSING_VERSION").IsRequired=false; } } else { // Enter your code here.; } console.log("Bug_FieldChange"); }
https://admhelp.microfocus.comALM8942
Tips to improve your search results...ALM Help CenterALM Help CenterALM Help17.0-17.0.1AllView Local Help CenterView Online Help CenterbackGo back in browser historyforwardGo forward in browser historyRemove search highlightsnext topicGo to next topicprevious topicGo to previous topicPrint the current topicVersion:
Send Help Center Feedback
Let us know how we can improve your Help Center experience.