Highlighted
New Member.
78 views

Conditional Defect Defaults

I am attempting to set conditional defect defaults for a specific user. Currently we have a field called Entry Type that is used to specify if a defect is Type A or B. One user is required to enter all of the defects and would like to have specific defaults for Type A defects and different defaults for Type B. I currently have a Select Case statement setup in workflow that will allow for this (which is shown below).  Using the Select Case statement once user1 sets a defect to Type A then BG_USER_07(uses a drop-down list) is set to A1. However, in certain situations BG_USER_07 may need to be set to a different value in the drop-down list and because of the Select Case statement the value can not be changed. I have tried to place the statement in Bug_New where it doesn't work at all. It does work when placed in Bug_WizardCustList or Bug_FieldChange but with the issue mentioned above. I believe the issue is caused because every time a field is change the Select Case statement runs again. I tried to place the Select Case statement in an if statement so it would only run if the entry type is null but it still does not fix the issue. Anyone have any suggestions? 

Select Case Bug_Fields("BG_DETECTED_BY").Value
Case "user1"
Select Case Bug_Fields("BG_USER_25").Value
Case "A"
Bug_Fields("BG_USER_07").Value = "A1"
Bug_Fields("BG_USER_18").Value = "A2"
Bug_Fields("BG_USER_17").Value = "A3"
Bug_Fields("BG_USER_01").Value = "A4"
Bug_Fields("BG_USER_23").Value = "A5"
Bug_Fields("BG_USER_14").Value = "A6"
Bug_Fields("BG_USER_03").Value = "A7"
Bug_Fields("BG_USER_20").Value = "A8"
Case "B"
Bug_Fields("BG_USER_07").Value = "B1"
Bug_Fields("BG_USER_17").Value = "B2"
Bug_Fields("BG_USER_01").Value = "B3"
Bug_Fields("BG_USER_23").Value = "B4"
Bug_Fields("BG_USER_14").Value = "B5"
Bug_Fields("BG_USER_03").Value = "B6"
Bug_Fields("BG_USER_20").Value = "B7"
Case Else
'No Defaults
End Select

Case Else
'No defaults
End Select

 

Labels (2)
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.