![]() |
Telelogic SYNERGY (steve huntington) | ![]() |
Topic Title: Set value of attribute on empty with CSAPI Topic Summary: Created On: 17-Oct-2007 15:12 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hi,
I have the attribute of an object filled with a certain value. I try to set the value of this attribute to empty using the CSAPI. But I get an error: The fault code: 4 The fault string: CsAPI: CRModify: Failed to modify CR data I don't want to delete the attribute. I just want to put the value back to empty. This is my code: my $csapi = new ChangeSynergy::csapi(); $csapi->setUpConnection("http"," $login = $csapi->Login(" my $problem = $csapi->GetCRData($login," $problem->getDataObjectByName("attrib_xyz")->setValue(""); my $tmpstr = $csapi->ModifyCR($login,$problem); If I use this piece of code and I fill in a value for the attribute... e.g.: $problem->getDataObjectByName("attrib_xyz")->setValue("test"); ... it works. Suggestions? ![]() |
|
![]() |
|
![]() |
|
I believe that the way Synergy represents an "empty" attribute is not to have the attribute associated with the CR.
Therefore the approach should be to delete the attribute. I suggets you try this in a "test" database before applying it to your live data, in case the results are not what you want. |
|
![]() |
|
![]() |
|
It is however possible to set the value of an existing attribute to empty via the CLI.
I would expect to have the same functionality in the PerlAPI. Indeed, deleting the attribute and creating it again is a possible workaround. But not a very nice one. And it requires some extra checkings in my code. |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.