Code does not work when clicking the Next and Previous buttons

by Community Manager on ‎11-09-2011 09:23 AM

Question

I have code that fires when I enter the testdetails of a test instance in test lab. I am trying to make some of the fields invisible. It works when I first open the details but if I click on the next, previous, First or last buttons in the details pop up it does not work. The code is getting called but does not make the fields invisible. Here is my code:

 

It is in  ActionCanExecute

If ActionName = "DetailsAct" Then
               Call InitializeDetails()
        ElseIf ActionName = "_dxact_NextTestBut_TestExecPropForm" Then
               Call InitializeDetails()
        ElseIf ActionName = "_dxact_PrevTestBut_TestExecPropForm" Then
               Call InitializeDetails()
        ElseIf ActionName = "_dxact_LastTestBut_TestExecPropForm" Then
               Call InitializeDetails()
        ElseIf ActionName = "_dxact_FirstTestBut_TestExecPropForm" Then
               Call InitializeDetails()
               
        End If

 

Here is the contents of the InitailizeDetails Sub

Sub InitializeDetails()

TestSetTest_Fields.Field("TC_USER_08").IsVisible = False
TestSetTest_Fields.Field("TC_USER_12").IsVisible = False
TestSetTest_Fields.Field("TC_USER_04").isvisible = False
TestSetTest_Fields.Field("TC_USER_06").IsVisible = False
TestSetTest_Fields.Field("TC_USER_15").IsVisible = False
TestSetTest_Fields.Field("TC_USER_14").IsVisible = False
TestSetTest_Fields.Field("TC_USER_13").IsVisible = False

End Sub

 

Anyone know why this would not work?

Answer

The Action Can Execute script runs before you get to the next row, so I put the code in the TestSetTests_MoveTo and it worked fine.

Search
Showing results for 
Search instead for 
Do you mean 
Contributors
HP Blog

HP Software Solutions Blog

Featured


Follow Us
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.