Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
retrieving ATTR_TYPE_SET attribute values
Bill_Cox_(NATRUR012_(Delete)_2422490)
I'm having trouble with retrieving attribute values of the children of a LAPI_ATTRIBUTES.ATTR_TYPE_SET. I'm using SDK 9.1.0.4 in Java. I have a category made up of several attributes, one of which is a set. I'm able to successfully get all of the other attributes in this particular category, and can successfully list the names of the child attribs in the set (these are defined as several checkboxes) -- but the values I get back are all false even when some are actually set true.I'm using AttrGetValues method in a LLValueEnumeration loop; attempting to retrieve value of each enumerated element from a previous AttrListNames for this set attribute. Parameters to AttrGetValues-- categoryVersion (same as I got back from a previous GetObjectAttributesEx), attrName (did a toString of each enumerated element from the AttrListNames of the set attribute), attrValuesType (set to LAPI_ATTRIBUTES.ATTR_TYPE_SET), attrValuesPath (set a LIST with first element = name of the set attribute to which the checkboxes are children, and second element = 0 indicating first occurrence of the set in the category), attrValues (to receive the child attrib's value). In each iteration on the set's children I get a boolean, which is correct data type, but it's always false no matter what the category actually contains. Anybody see what I'm doing wrong? Thanks for your assistance. -Bill
Find more posts tagged with
Comments
Bill_Cox_(NATRUR012_(Delete)_2422490)
Turns out that you must also use ATTR_DATAVALUES for the attrValuesType parameter of method AttrGetValues to get the value of a set attribute's child attribute (same as non-set attributes of a category). Well it makes sense now, but when I read the doc I thought you had to use the ATTR_TYPE_SET constant when dealing with children of a set attribute. You just want to use that to CHECK whether an attribute is a set. Attached code is not production suitable, but illustrates how you can retrieve set attribs. I found Glenn Heying's type tree traversal sample and Claude Deschamp's enumeration looping sample quite useful and borrow them here! -Bill