| || |
Accessing Folders in Test Lab via Workflow Obj
I'm Using QC 9.2
I need to write an action that will act on all of the Test Sets that are contained in folders below the folder that is currently selected. The problem I have is that I need to find a way to identify which folder in the Test Lab is selected when the action is called. Normally I would use the Workflow Objects to access the fields of the selected item like this:
This will return back the value stored in the CY_CYCLE_ID field of the CYCLE table for the Test Set that is currently selected.
What I need is to get that same functionality but for the folders. Does anyone know of a way to access information about the selected folder? The Workflow Objects don't seem to include folder objects and I've tried guessing at object names and come up with nothing.
You can access the information about folders using the API like this:
This will return back the CF_ITEM_ID from the CYCL_FOLD table, which is what I need, for the XXX folder. The problem is I don't know what folder to look for because I can't see what is currently selected by the user.
Re: Accessing Folders in Test Lab via Workflow Obj
There are 2 possible ways to solve the problem:
1. In the ScriptEditor uder "TestLab module script" create procedure "MoveToFolder":
On Error Resume Next
'show selected folder name
On Error GoTo 0
QC 9.2 patch 20 has this procedure in the ScriptEditor tree, but it's possible, that previous patches doesn't.
2. You could obtain parent folder id for current TestSet. You should get TestSet_Fields("CY_FOLDER_ID").Value