Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...Compliments on a fantastic web site. I have learned so much from my threads and even if sometimes I cannot solve the problem, it gives me the reassurance that I am not the only one putting up with it!..."

Geography

Where in the world do Tek-Tips members come from?
DrDDT (TechnicalUser)
15 Dec 09 9:32
Hi!

We have several categories, with the same attribute 'country'.
In Livelink 8 we could search all the country attributes at once. In livelink 9 that's no longer possible.

To solve this I'd like to merge the categories into one category. What is the best way to do this?

We're currently on 9.2 but planning to upgrade to 9.7.1.
Helpful Member!  ggriffit (Programmer)
15 Dec 09 10:15
You can do multicategory searching in 9x, but for simplicity I'd recommend creating a short LAPI program to find all the documents with the existing Categories on them and then add the new "Country" category to these objects.

Greg Griffiths
Livelink Certified Developer & ECM Global Star  Champion 2005 & 2006
http://www.greggriffiths.org/livelink/

DrDDT (TechnicalUser)
15 Dec 09 11:20
Thanks for the reply.

Is there any way to automate the multicategory search?
Users are used to one country field, that searches over all country attributes in all relevant categories.

For the merging part: Is there any way to do it without LAPI?
I can write livereports/webreports, but I'm no LAPI programmer.
ggriffit (Programmer)
15 Dec 09 12:14
If you know what the other categories are you should be able to create a search criteria to include those in your code.

You could perhaps amend the DB directly via a LiveReport, but I would STRONGLY advise against that as there could be lots of fallout.

As for WebReports or the specifics of the LAPI code, I'll leave others, who are more knowledgeable in those parts to provide more detail.

Greg Griffiths
Livelink Certified Developer & ECM Global Star  Champion 2005 & 2006
http://www.greggriffiths.org/livelink/

DrDDT (TechnicalUser)
25 Mar 10 5:54
Hi,

Does anyone have example code I can use, preferable C?
I do have extensive Livelink knowledge, but I've never used LAPI before.
Helpful Member!  appnair (Programmer)
25 Mar 10 9:46
The code samples for LAPI are in the KB.Since you said C the closest I can think of is programmin in C++.I do most of my lapi work in Java and nowadays C# because they are almost identical.There are a lot of community example in java,C# and VB.NET in the communities website also.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008
http://www.tek-tips.com/faqs.cfm?fid=2884
http://www.linkedin.com/in/appunair

DrDDT (TechnicalUser)
26 Mar 10 12:41
Thanks,

I just managed to create some very basic Lapi code.

Another question:

How would I use Lapi to do the following:

1. Get all documents with certain categories applied.
2. For all found nodes, create new category
3. Fill new category with data from found category.

Can you do step 1 directly from LAPI, or would you use a Livereport, en use the results with the LAPI code?
appnair (Programmer)
26 Mar 10 16:14

Quote:


1. Get all documents with certain categories applied
Run a sql report that goes something like this reaserch the filters correctly or create a view so that it will not hang your lapi program.

select id,defid,defvern from llattrdata where defid=<category you wantt to manipulate>

Check the table.If you write a LR here LAPI will give it back to you as a RecArray and you will waste time pasring thru it.The id that you get is the handle for the lapi document objects so you could do things like
doc.ChangeMyOldCtaegoryToNew......

Quote:


For each nodeid found you should ask livelink what is the version applied it is the old version now.You should now call upgrade on the category object that has your country field added.So think of it as livelink giving you the structure that is sitting in the category volume.Now using your logic you should take each value of the attribute in the oldeversion add it on this new template with country.
If you are adding a new category then this is not needed.You should do a FetcVersion of the category and update the object info

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008
http://www.tek-tips.com/faqs.cfm?fid=2884
http://www.linkedin.com/in/appunair

DrDDT (TechnicalUser)
29 Mar 10 9:57
Thanks for the help sofar.

I have a little trouble understanding the LAPI structure.
The (very few) code examples on the knowledge centre are not very helpfull for the beginner.

Are there any other sources for sample code, preferably C(++)?
ggriffit (Programmer)
29 Mar 10 12:14
There are some Java ones here - http://www.greggriffiths.org/livelink/development/lapi/ - which include Cats & Atts

Greg Griffiths
Livelink Certified Developer & ECM Global Star  Champion 2005 & 2006
http://www.greggriffiths.org/livelink/

appnair (Programmer)
29 Mar 10 12:32
this one at the KB is probably worth a look
https://knowledge.opentext.com/knowledge/llisapi.dll/LAPI_-_Change_Attribute_Value_on_a_Livelink_Item.cs.txt?func=doc.Fetch&amp;nodeid=12032537&amp;docTitle=LAPI%20-%20Change%20Attribute%20Value%20on%20a%20Livelink%20Item.cs

It basically works like this and all lapi stuff works like this.

You need code to get into a livelink server.
To do anything with library objects such as add document,addctaegory etc you need a LAPI_Documents objects.
Similarly for doing workflow you need a different lapi object and for search or users & groups.

All the example is trying to show how you can manipulate a hardcode livelink document object 3947 to which a category object 4176.The cats atts sample that you will find in greg's site is creating a category object from scratch.

I would certainly download the free C# stuff from Microsoft or the free java as C++ is not something that I want to mess with.

 

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008
http://www.tek-tips.com/faqs.cfm?fid=2884
http://www.linkedin.com/in/appunair

DrDDT (TechnicalUser)
30 Mar 10 6:02
Thanks for the help sofar.

I'll download C# express, and try using that.
Seems that C++ is not used very much anymore. It seemed like the logical choice to me since I initally learned programming in C(++)
appnair (Programmer)
30 Mar 10 9:05
well if it s a new livelink 9.7.1 you also have the option of coding in webservices as I am told that is the future.For the time being I 'm happy with LAPI and oscript.Will cross that bridge when the time comes

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008
http://www.tek-tips.com/faqs.cfm?fid=2884
http://www.linkedin.com/in/appunair

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close