Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Attach value to a popup text type in a category thru LAPI program

Status
Not open for further replies.

hanreb

Technical User
Jan 23, 2008
90
US
Here is the scenario.
1. I have written a LAPI program in java.
2. The program uploads a document into livelink and I attach a category to the document thru my program
3. In the program I set values to all the text attributes of the category.

Below is what I am not able to do. And I need help.

I am not able to attach value to a POPUP text attribute of the category thru my program.
I can attach value to a normal text attribute, which is not a POPUP.
Here is the piece of code that I have.

/* Attach value to a POPUP text attribute of a category */
attrValues=new LLValue().setList();
attrValues.setSize(1);
attrValues.setString(0, "FGT");
if (attr.AttrSetValues(catVersion, "TAX TYPE", attr.ATTR_DEFAULTVALUES, attrValPath, attrValues) != 0)
{
System.out.println("AttrSetValues Failed.");
return;
}
********/

I appreciate your help.

Thanks in Advance,
Sunu
 
This is form an old project so some of the functions are stugff that we wrote I hope you can make use of it.I hink all you have to do is to pass a list as the vailable value.I think that is what your code is doing but try this anyways.Check out greggriffiths.org for catattwhathaveyou.zip there is more documentation on it as well good luck
Code:
//First get the CATVERSION Datastructure
if (doc.FetchCategoryVersion(catID, catVersion) != 0)
                {
                    WriteErrors(session, "FetchCategoryVersion failed.");
                }
//now manipulate the catversion which is passed by reference
LLValue attrValuesPath = (new LLValue()).setAssocNotSet();
LAPI_ATTRIBUTES	attr1 = new LAPI_ATTRIBUTES(session);
LLValue attrValues = (new LLValue()).setList();
 attrValues.add(stringRegion);

if (attr.AttrSetValues(catVersion, "Region", LAPI_ATTRIBUTES.ATTR_DATAVALUES, attrValuesPath, attrValues) != 0)
                {
                    WriteErrors(session, "Adding region failed.");
                }

//finally close it up
if (doc.SetObjectAttributesEx(objID, catVersion) != 0)
                {
                    WriteErrors(session, "SetObjectAttributesEx failed.");
                }

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
Mr.Appnair,
Thanks for the reply.
I don't know if I confused you with a big mail.
In short, this is what I want.
I can attach value to a text type attribute.
I am looking for an answer for the below issue.
I cannot attach value to a popup text attribute in a category.
The key word here is POPUP TEXT ATTRIBUTE of a category.

I appreciate your help.
Thanks,
Sunu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top