02-07-2013 02:35 PM
I am attempting to hide several system fields on the manual Run window (such as Baseline, Host, etc).
If I place the following code in the Manual Runner Script module, in the Run_FieldChange subroutine, I can hide them after a value is changed on the form:
However, I would like them hidden from the start. The issue is that the Manual Run window appears to open and runs the 'RunTestsManually' script, which is in a seperate module (The Test Lab module). If I include the above line of code in that script, I simply get an error letting me know that it does not have a Run_Fields in it's scope (it reports that it needs an object).
I have spent a few hours now searching around the net and seeing if I can get at those fields from the Tets Lab module using TDConnection but so far no luck.
Thanks for any help you can offer!
Solved! Go to Solution.
02-08-2013 03:49 PM - edited 02-08-2013 03:49 PM
Thanks for the reply Massimo.
I spent today trying the dialog box, and some other areas. Finally I popped a message box in just about every module I thought might be called.
It turns out you can accomplish this in the EnterModule sub in Common Script. When that script is called, it has scope on the module that is running it. So, when the Manual Run window opens and calls EnterModule with the module name "ManualRun" I can catch it and call a routine that changes the visibility on run fields.
Inside of EnterModule :
If ActiveModule = "ManualRun" Then
Inside of ManualRun module script:
This of course could be extended to do other operations on the fields of the manual run box as well.
05-16-2013 12:26 AM
I am new to workflow customization and i found your post helpful and wanted to extend your logic to do other operations on fields under the Run module, however i was not able to implement is successfully
Our requirement is that when we open the manual run window , i have to populate the Run Name field with a value of a custom field which is on the test lab.
I followed your logic, only inside the function instead of making the fields not visible, i wrote the code to assign value to the Run Name field.
But i did not work. I tried to just echo the value to ensure that i am getting to this function
does not work but
msgbox "Manual Run"
Can you help me out on this ?
05-16-2013 11:01 AM
The reason your code to echo the value didn't work is because it uses incorrect syntax
It should be
Sub HideManualRunFields msgbox TestSet_Fields("CY_USER_01").Value end Sub
(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.)
08-30-2013 02:42 PM
the problem in your piece of code is that TestSet_Field(... object is no more recognize in ManualRun module. What you can get directly are something like Run_Fields(.. or Step_Fields(...
so to do what you need the sub could be something like:
'retrieve the TestSet from the Run object
set myTestSet = TDConnection.TestSetFactory.Item(Run_Fields("RN_CY
'Fill the RunName with the value of the TestSet Custom Field
'destroy the TestSet object
set myTestSet = Nothing
Hope this helps.