I am trying to extract requirements using the function GetChildrenList(id), the following is my code:
Sub Reqextraction ()
'here QC connection related code
Set rfact1 = QCConnection.ReqFactory 'creating reqfactory object
Set rfilter1 = rfact1.Filter 'filter object
rfilter("RQ_TYPE_ID") = "Functional" Or "Folder" Or "User Story" 'filtering based on type
rfilter1.KeepHierarchical = True 'hierarchy is set as true
father_id1 = 81 'manually entered Requirement id
GetChildren1 rfact1, rfilter1, father_id1 'calling this method to extract rest all req's
end sub
Sub GetChildren1(rfactr2, rfilterr2, father_idr2)
Set Childrenr1 = rfactr2.GetFilteredChildrenList(father_idr2, rfilterr2)
For Each Childr1 In Childrenr1 'Navigating to each child
MsgBox(Childr1.field("RQ_REQ_STATUS")) 'Err: The field cannot be used with the type <Folder>
MsgBox(Childr1.field("RQ_USER_TEMPLATE_16")) 'Err: the field cannot be used with the type <Folder>
MsgBox(Childr1.field("RQ_REQ_NAME")) 'this is working fine
GetChildren1 rfactr2, rfilterr2, Childr1.ID 'calling the same method with obtained req id
Next
end sub
Could you please help me fix these errors?