views:

34

answers:

1

Hey!

New to Perl and new to ClearQuest Perl API both. I am trying to clear some values from a CQ form. I am able to clear values by simply setting the value to "" but it doesn't work on lists. Any idea how this can be done?

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

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


# following works just fine

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

Here is CQ API reference: http://publib.boulder.ibm.com/infocenter/cqhelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearquest.apiref.doc/r_examples_mangngrecrds.htm

A: 

As I understand your API, the undef is unlikely to work. setFieldValue can not be called on a list to begin with. I don't know much Perl either. But try creating a loop to read all values, and delete each value using DeleteFieldValue method of entity object. All methods of entity objects are listed here: http://publib.boulder.ibm.com/infocenter/cqhelp/v7r0m1/index.jsp?topic=/com.ibm.rational.clearquest.apiref.doc/c_entity_mthds.htm

I don't know Perl syntax well. But someone here may be able to help.

hth.

AspiringGuru