Vbscript Re:处理错误:字段RQ_REQ_STATUS不能与<;文件夹>;

Vbscript Re:处理错误:字段RQ_REQ_STATUS不能与<;文件夹>;,vbscript,hp-quality-center,Vbscript,Hp Quality Center,我试图使用函数GetChildrenList(id)提取需求,以下是我的代码: Sub Reqextraction () 'here QC connection related code Set rfact1 = QCConnection.ReqFactory 'creating reqfactory object Set rfilter1 = rfact1.Filter 'filter object rfilter("RQ_TYPE_ID") = "Functi

我试图使用函数GetChildrenList(id)提取需求,以下是我的代码:

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
子请求提取()
'这里是QC连接相关代码
设置rfact1=QCConnection.ReqFactory'创建ReqFactory对象
设置rfilter1=rfact1.Filter'过滤器对象
rfilter(“RQ_TYPE_ID”)=“功能性”或“文件夹”或“用户故事”根据类型进行过滤
rfilter1.KeepHierarchical=True“层次结构设置为True
父_id1=81'手动输入的需求id
GetChildren1 rfact1,rfilter1,父\u id1'调用此方法以提取其余所有请求
端接头
子GetChildren1(rfactr2、rfilterr2、父亲idr2)
Set Childrenr1=rfactr2.GetFilteredChildrenList(父\u idr2,rfilterr2)
对于Childrenr1'中的每个Childrenr1,导航到每个孩子
MsgBox(Childr1.field(“RQ_REQ_STATUS”)”错误:该字段不能与类型一起使用
MsgBox(Childr1.field(“RQ\u USER\u TEMPLATE\u 16”))的错误:该字段不能与类型一起使用
MsgBox(Childr1.field(“RQ_REQ_NAME”)“这工作正常
GetChildren1 rfactr2、rfilterr2、Childr1.ID'使用获取的请求ID调用相同的方法
下一个
端接头

您能帮我修复这些错误吗?

我发现Req类型文件夹没有状态,因此,如果正在提取的Req文件夹在使用if条件的状态代码的帮助下被旁路,那么在这种情况下,您将提取所有字段值。

我绕过了错误代码(对于Req类型文件夹)使用if条件。