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
Dealing with categorys and Lists -- special character for empty fields '?'
Taavi_Ilves
I want to make one application which fills field A (simple text field) in one category, if that field A is empty.When I use AttrGetValues() and field A is filled with text "blabla", then AttrGetValues() returns List as "{blabla}". But when A is not filled, it returns List "{?}", which is very confusing.What is this '?' value? How can I test if this List contains normal '?' (ascii code 63) or special '?'Thank you!
Find more posts tagged with
Comments
Taavi_Ilves
I use Java LAPI and Livelink 9.7
Carsten_Kulms
The ? is the string representation of the UNDEFINED value.If you inspect the list of values by means of the LLValue API you'll find that it contains in case of "{?}" a LLValue with isUndefined()==truein case of "{blabla}" a LLValue with isString()==true
Taavi_Ilves
Thanks for your reply.I define attrValues like this:LLValue attrValues = new LLValue().setList();I use AttrGetValues which sets attrValues to represent data inside category field.attrValues.isList() == True(both with filled in string in category and blank field in category (NULL in db)).attrValues.isString()==False (both with filled in string in category and blank field in category (NULL in db)).attrValues.isUndefined()==False (both with filled in string in category and blank field in category (NULL in db)).I can use attrValues.toString() and it gives me "{blabla}" or "{?}" (in case of empty field) as a string. .toBoolean(), .toDate() and .toDouble() obviously fail. I'm currently out of any ideas how to test the field correctly, but use oracle jdbc, but then LAPI loses its point.
Pierre_Nocera
Message from Pierre Nocera <
pnocera@opentext.com
> via eLink
eLink
the attrValues LLValue you define is a List. So you shouldn't check for attrValues.isUndefined(), but for the first item in attrValues is defined or not.
Pierre
De:
eLink Discussion: LAPI Discussion [mailto:lapi@elinkkc.opentext.com]
Date:
mar. 11/03/2008 14:22
À:
eLink Recipient
Objet :
attrGetValues returns List
attrGetValues returns List
Posted by
taaviilves
(Ilves, Taavi) on 03/11/2008 09:17 AM
In reply to:
the ? is the string representation of Undefined (not a special text)
Posted by
ckulms
(Kulms, Carsten) on 03/11/2008 08:17 AM
Thanks for your reply.
I define attrValues like this:
LLValue attrValues = new LLValue().setList();
I use AttrGetValues which sets attrValues to represent data inside category field.
attrValues.isList() == True(both with filled in string in category and blank field in category (NULL in db)).
attrValues.isString()==False (both with filled in string in category and blank field in category (NULL in db)).
attrValues.isUndefined()==False (both with filled in string in category and blank field in category (NULL in db)).
I can use attrValues.toString() and it gives me "{blabla}" or "{?}" (in case of empty field) as a string. .toBoolean(), .toDate() and .toDouble() obviously fail.
I'm currently out of any ideas how to test the field correctly, but use oracle jdbc, but then LAPI loses its point.
[To reply to this thread, use your normal E-mail reply function.]
Topic:
Dealing with categorys and Lists -- special character for empty fields '?'
Discussion:
LAPI Discussion
Livelink Server:
Knowledge Center
To Unsubscribe from this Discussion, send an e-mail to
unsubscribe.lapi@elinkkc.opentext.com
.
Taavi_Ilves
Yes, you hit the core of this question actually. I didn't say it out loud, but I really didn't know how to do it. attrValues.getValue(0) is represents the first member of this list.attrValues.getValue(0).isUndefined == true in case of {?}Thanks for your ideas, I'm able to continue my work.
Taavi_Ilves
Sadly this .toValue(int n) isn't documented under my LAPI documentation and JavaDoc isn't available also, so I was mislooking it.Do you have .toValue(int n) explanation in your documentation under "Value API: Java and .NET" ?
Carsten_Kulms
Please have a look at section "Field Retrieval Methods" of the chapter "Value API: Java and .NET".
Taavi_Ilves
Yes. I've overlooked it hundred times. Thank you. Case closed.