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
Updating set in category - What is a valueIndex?
Taavi_Ilves
Hi. I'm trying to update category version with AttrSetValue. Everything works as it should, but I have problems dealing with sets. Problem lies in attrValuesPath, because I cannot understand what the valueIndex is.This is LAPI documentation about attrValuesPath: attrValuesPath -- a List value object. Specify this parameter only when the attribute specified in the attrName parameter is a child of an attribute of type Set in the category version. The first member of this list is the name of the parent attribute of type Set. The second member of the list is the valueIndex for the occurrence of the parent attribute. If this parameter is empty or not of type List, it is ignored. Otherwise, the list must contain the name of an existing attribute of type Set with a corresponding valueIndex. For example, if Employee is an attribute of type Set in a category version, then { 'Employee', 0 } is the attrValuesPath value for the first occurrence of the set in the category version.....If I have a category card "Category 01" and it has one regular text-box "Field 01" and set "Set 01" which has 2 textboxes "Field 02" and "Field 03". And if I want to change "Field 02" in the set, how should I formulate AttrSetValues ? I'm using LL 9.5 SP1 and latest LAPI that comes with it.Please help me sort it out!?
Find more posts tagged with
Comments
Hugh_Ferguson
I think the confusion around the valueIndex is that this value is really only important for multi-valued attributes. So, whether you are setting Field 02 or Field03 in your set, the path LLValue object would still be {"Set 01", 0}. Now if you were adding multi-values to this, and you wanted to update the second, the valueIndex would be 1.At least so far this conforms to my experience
-Hugh FergusonOT Global Services