Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Update Attributes on a Document Object's category
Srihari_Ravi
I am having problem updating Attributes on a document object's category. I am able to get the attribute values using AttrGetValues() method. I need to update the attributes using AttrSetValues() or AttrSet() method. Both the methods did not work to update attributes. Can you please help me out on this issue?
Find more posts tagged with
Comments
Krishnankutty_Nair
Try this example it is in java and I hope you are using itI have mentioned what I am trying to do in the source file itselfDebug with builder also if you want to see what is wrong with the call
Srihari_Ravi
Thanks a lot. I will try and let you know.
Srihari_Ravi
I got this working with the following example:The problem that you are probably running into here is with the attrValuesPath parameter. For a normal attribute this parameter is left as an empty LLValue. However in a Set attribute it has to be set as a List. The first element of the List is the Name of the Set Attribute and the second element is the occurrence of the set since a set attribute can be multivalued as well. Eg. Set Attribute Definition: Employee Name EmpNo eMail In this case Employee is the Set Name and (Name, EmpNo, eMail) are attributes in the set. You would set up the AttrValuesPath as follows. attrValuesPath.setList();attrValuesPath.add("Employee");attrValuesPath.add(0); Now if you wanted to pull the value of eMail from the set you would make a call to AttrGetValues as follows: AttrGetValues(catVersion, "eMail", LAPI_ATTRIBUTES.ATTR_DATAVALUES, attrValuesPath, attrValues) This call would pull the value stored in eMail. Now say you had a multivalued set like the following: Employee Name - XXXXXXXX EmpNo -22222222 eMail - abc@abc.com Name - yyyyyyyyyyyyyy EmpNo - 3333333333 eMail - xyz@xyz.com Now if I wanted to get the second occurrence of the set all I would change is the following: attrValuesPath.setList();attrValuesPath.add("Employee");attrValuesPath.add(1); I hope this clarifies things a bit. I have also attached a sample that you can look at.