I'm trying to hide particular System_Fields from the Requirement (0r Test) module depending on the Requirement_Type. I've had limited success so far.
I included the following code in the Workflow Scripts > Common Script > EnterModule sub
'Use ActiveModule and ActiveDialogName to get
'the current context.
'msgbox "You have just entered the " & ActiveModule & "module."
On Error Resume Next
If Req_Fields.Field("RQ_TYPE_ID").Value = "Section 1" Then
Req_Fields.Field("RQ_REQ_PRODUCT").IsVisible = False
Req_Fields.Field("RQ_REQ_TYPE").IsVisible = False
Req_Fields.Field("RQ_REQ_STATUS").IsVisible = False
Req_Fields.Field("RQ_REQ_PRIORITY").IsVisible = False
Req_Fields.Field("RQ_TARGET_REL").IsVisible = False
Req_Fields.Field("RQ_TARGET_RCYC").IsVisible = False
On Error GoTo 0
It works the first time you enter the module or if you switch from another module but if I switch Requirements within the Requirement Module it no longer hides the detail Fields indicated. I'm assuming there is a better place to put this code or I need to target the active requirement but I'm not sure how exactly.
Any help you can provide would be most appreciated.
This doesn't work when you move between requirements because you have already entered the module.
Try putting your code into the Req_MoveTo routine. This should work for existing Requirements.
What about when creating a new requirement? You could try placing your code in the Req_FieldChange(Field Name) routine as well. That way, when a user selects the appropriate Type, the displayed fields will change.