Quality Center / ALM Practitioners Forum

Hide System Fields From Module Details

Go to solution
Respected Contributor.

Hide System Fields From Module Details




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


Sub EnterModule
  '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
End If
On Error GoTo 0
End Sub


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.

Acclaimed Contributor.

Re: Hide System Fields From Module Details

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.

Respected Contributor.

Re: Hide System Fields From Module Details

Thanks Roni,


That sure did it, I know it had to be in the wrong place as once your in the module it's not going to be looking at that any longer.  Good call.



Acclaimed Contributor.

Re: Hide System Fields From Module Details

Thanks for the Kudos!
Please also mark the post as Solved.