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
Fail to save attribute value if it is null
ImvecUser1_(Delete)_2148388
We are using LAPI9.0 on VB and we have questions regarding saving attribute values in particular catVersion. Actually I can successfully save the attributes if the value is not null. However if it is an empty value, the attributes cannot be updated. Please advise.Here is the code:For i = 0 to hiddenAttrNo - 1Select Case hiddenAttrType(i)Case 10'10 is for type StringPopupDim inStrValue2 as stringinStrValue2 = ""'if inStrValue is not null, the following codes work fine and be able to save attributes 'however if the inStrValue2 is null, the first and second status return zeros but it shows "101404"'in the final statusstatus = LL_ListSetString(hiddenAttrValues, v, inStrValue2)status = LL_AttrSetValues(hiddenSession, hiddenCatVersion, hiddenAttrName(i), LL_ATTR_DATAVALUES, hiddenAttrPath, hiddenAttrValues)status = LL_SetObjectAttributesEx(hiddenSession, hiddenObjectID, hiddenCatVersion)msgbox statusCase -1:::End SelectNext i This is pretty urgent. Please advise. Thanks in advance.Jovi
Find more posts tagged with
Comments
Richard_Boyne_(boyne_(Delete)_891609)
To determine why a lapi function returned an error and to provide more details you might want to use code similar to that shown in the following Reply from another LAPI Discussion thread,
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=2510790&objAction=viewIn
addition to what that code segment does, I would output the "status" and "message" variable's values as well.
Richard_Boyne_(boyne_(Delete)_891609)
Would you please double check your results?Re:"'if inStrValue is not null, the following codes work fine and be able to save attributes 'however if the inStrValue2 is null, the first and second status return zeros but it shows "101404"'in the final statusstatus = LL_ListSetString(hiddenAttrValues, v, inStrValue2)status = LL_AttrSetValues(hiddenSession, hiddenCatVersion, hiddenAttrName(i), LL_ATTR_DATAVALUES, hiddenAttrPath, hiddenAttrValues)status = LL_SetObjectAttributesEx(hiddenSession, hiddenObjectID, hiddenCatVersion)"I do not see how the above mentioned error status ("101404")could be returned by this code segment.Maybe you meant "107404"?Regardless I believe that you will still want to retrieve the error message(s) that should provide more details as to why this status was returned. The prior posting at,
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=2515169&objAction=view&show=0has
a pointer for a code segment to retrieve status error message(s).good luck