Here is a way to do it:
- Declare a global variable in the Test Plan workflow (outside the procedures:
Dim isNewFolder
- Set it to True in TestFolder_New:
Sub TestFolder_New isNewFolder = True End Sub
- Add this code to TestFolder_MoveTo:
Sub TestFolder_MoveTo If isNewFolder Then Set currentFolder = TDConnection.TreeManager.NodeById(TestFolder_Fields("AL_ITEM_ID").Value) currentFolder.TestFactory.AddItem("Dummy Test") Set currentFolder = Nothing isNewFolder = False End If End Sub