ClearQuest Perl:如何清除值列表? SetFieldValue不适用于列表

时间:2010-10-21 22:16:11

标签: perl clearquest

Perl的新手,也是ClearQuest Perl API的新手。我试图从CQ表单中清除一些值。我可以通过简单地将值设置为“”来清除值,但它不适用于列表。知道如何做到这一点?

# following doesn't work on lists. What to do? 

    $entity->SetFieldValue("Foo_List", "");


# following works just fine

    $entity->SetFieldValue("barstatus", "");

以下是 CQ API 参考: http://publib.boulder.ibm.com/infocenter/cqhelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearquest.apiref.doc/r_examples_mangngrecrds.htm

1 个答案:

答案 0 :(得分:0)

据我了解您的API, undef 不太可行。无法在列表中调用 setFieldValue 。我也不太了解Perl。但是尝试创建一个循环来读取所有值,并使用实体对象的 DeleteFieldValue 方法删除每个值。 此处列出了实体对象的所有方法:http://publib.boulder.ibm.com/infocenter/cqhelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearquest.apiref.doc/c_entity_mthds.htm

我不太了解Perl语法。但是这里的某些人可能会提供帮助。

第h