Highlighted
shekarls Absent Member.
Absent Member.
311 views

Disable a field based on value selected

Hi All,
In QC, i have created two new user Defined fields under TEST PLAN module.
FieldA has a dropdown values, and FieldB is just a text box.
I am able to see those fields in Test Plan.

the below code doesnt work.....where FieldB should only be visible when one of the drop down values from FieldA is selected, else it should be either graded out or not display in Test plan.

I dont know under which section i need to put this logic..and whether logic is correct in first place.

FieldA = TS_USER_21
FieldB=TS_USER_22

<MYCODE>
If (Test_Fields("TS_USER_21").Value = "A1" or Test_Fields("TS_USER_21").Value = "A2" or Test_Fields("TS_USER_21").Value = "A3" or Test_Fields("TS_USER_21").Value = "A4" or Test_Fields("TS_USER_21").Value = "A5") Then
Test_Fields("TS_USER_22").IsVisible = True
End If

<MYCODE>


Cheers

0 Likes
2 Replies
Absent Member.. Trudy Claspill Absent Member..
Absent Member..

Re: Disable a field based on value selected

There is an example of changing a field properties based on a value changing in another field in the Adminstrator Guide in the chapter on Worflow Examples and Best Practices for ALM QC v11.  Take a look at that.

[If this post solves or helps solve your issue, mark the thread as solved and give KUDOS to the author for their assistance.]

(Opinions expressed in my postings are mine alone, and do not reflect the opinions of my employer.No warranties express or implied for any solution/suggestion posted.)
0 Likes
Absent Member.. WW439513 Absent Member..
Absent Member..

Re: Disable a field based on value selected

I hope you have written the code under FieldChange.

The code is correct but you need to add below statement in the TEST_NEW and at the begining of FIELD_CHANGE code.

 

Test_Fields("TS_USER_22").IsVisible = False

 

This will make your default nature as invisible for field "TS_USER_22"  and it will be visible only when some condition is met as per your code.

 

 

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.