Re: Hide System Fields From Module Details (344 Views)
Reply
Frequent Advisor
Nick_NIPR
Posts: 41
Registered: ‎10-05-2012
Message 1 of 4 (350 Views)
Accepted Solution

Hide System Fields From Module Details

[ Edited ]

 

Hello,

 

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.

Honored Contributor
RoniRobinson
Posts: 623
Registered: ‎07-21-2011
Message 2 of 4 (344 Views)

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.

Frequent Advisor
Nick_NIPR
Posts: 41
Registered: ‎10-05-2012
Message 3 of 4 (340 Views)

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.

 

Thanks.

Honored Contributor
RoniRobinson
Posts: 623
Registered: ‎07-21-2011
Message 4 of 4 (327 Views)

Re: Hide System Fields From Module Details

Thanks for the Kudos!
Please also mark the post as Solved.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.