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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removing category attached to a document

Status
Not open for further replies.

hanreb

Technical User
Jan 23, 2008
90
US
Hi,
I have a category attached to a document in livelink.
At any point of time, I do not want the user to remove the category attached to a document.
I understand that we cannot disable the remove button on the category page.
Once user clicks the remove button, all the attribute values of the category seems to get lost permanently.
The table dauditnew seems to have one record with reg to the document whose category was removed.

I want to capture these attribute values, some how.

I am thinking of creating a database trigger which fires on delete of the llattrdata table, and store the attribute values in some other table.
Is there any other way to capture the lost data.
Is there anything wrong in writing a dtabase trigger in the LLW schema, creating a different table there etc.

Any advice is greatly appreciated.

Thank You,
Sunu
 
You can add the trigger and it shouldn't affect anything. The other way you can do this is by adding a callback on changes to categories. There is a callback system that allows you to use Oscript to create custom functions that fire when attriubte values change or get deleted.
 
Hi,
How do I add callback on changes to categories ?
Could you please explain more on this. Or any source that I could look up on this,

Sunu
 
To add a callback for when category values are changed you must use Oscript. Find the object LLIAPI:LLIApi Root:NodeCallbacks. Orphan this object into your custom Ospace. You can either use the orphaned object as the callback, or if you have a number of different callbacks you want to add, create children of the object and register them will the subsystem.

To register the object with the subsystem you must set the fEnabled field to true. If you want the callback to fire for all node types, set the fSubTypes field to Undefined. Otherwise it should be a list of node types for which you want the callback to fire. You will probably want to implement the CBCategoriesUpdatePre and CBCategoriesUpdatePost methods.

In my opinion, these methods should have had more data passed in to make it easier to determine the categories and attribute values, but since they don't you may need to write code to do that. In the Pre method I would get the cat data that I was interested in and add it to the input parameter updateInfo. This data will then be passed to the Post method and you can do the comparison and proceed from there.
 
Hi
We had similar wishes. We use Livelink in Agricultural Vocational Education in the Netherlands. For instance: Students adds documents in his portfolio. The assessor changes the catts of this document (e.g. change it from "request for grading" in "graded"). After this assessment the student can only see this catt's but cannot change them anymore. Hans Stoob made a Simple Document Lifecycle Management tool to do this.
The SDLM-category has restrictions (Who may use it, the owner of the document of somebody else) and you can give permissions to each attribute, See, See Content of Change attribute. Even the ownership of the docuemtn can easily change and/or the documents can be automatically moved to another location.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top