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
Adding rows to attributes via LAPI
JohnL
Hi, we have an application that let's users modify category attributes programmatically, I'm having problems getting it working when the user wants to add rows to an attribute (ala clicking the add button next to the attribute field within the UI). For example, if a attribute has been specified with three rows and there are already values in those three rows, modifying the values works, however if there is only currently one row, or the attribute hasn't yet been populated, trying to set the value to a list of three values fails with the error:(Could not add another value or row to 'Date Field Attribute'. The maximum number of rows is exceeded.)Is there some way that I need to modify the attribute before setting the values if the length of the list is growing? (my code presently checks how many rows are allowed before calling setValues, the failures are occuring on actions that can be executed by hand successfully). Here's how I'm doing it:LLValue oldAttrVals;FAIL_ON_ERROR(LL_AttrGetValues(mGetSession(), catVersion, attr.c_str(), LL_ATTR_DATAVALUES, path, oldAttrVals)); //mSetList takes the values in the element param, sets the size of the list and then copies the values to the list.mSetList(oldAttrVals, element); FAIL_ON_ERROR(LL_AttrSetValues(mGetSession(), catVersion, attr.c_str(), LL_ATTR_DATAVALUES, path, oldAttrVals));FAIL_ON_ERROR(LL_SetObjectAttributesEx(mGetSession(), objIdAssoc, catVersion));The error is occuring on the setObjectAttributesEx call. Any assistance would be greatly appreciated!ThanksDawn
Find more posts tagged with
Comments
There are no comments yet