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
Help with re-ordering documents using LAPI?
Robert_Davies_(unlondonadmin_-_(deleted))
Hi.I am trying to use the LAPI_DOCUMENTS.ReorderObject() operation to make a particular sub-document in a compound document appear first.To do this I call it passing the parameter '1' for the position. The API call returns 0 indicating success, but when I check doesn't actually do anything to the order of the sub-document.Can anyone else verify this behaviour? Know why it's happening?Best regards/matt.
Find more posts tagged with
Comments
Robert_Davies_(unlondonadmin_-_(deleted))
An API that returns 0 (success) when it hasn't done anything seems like a bug to me, but i'd like a second opinion...Anyone?Best regards/matt.
Paul_Eddie_(PEddie_(Delete)_801545)
I just wrote a quickie java program to test the ReOrderObject() function. Yes, it seems to return a status of 0 even if it didn't actually change the ordering.However, you can use the UpdateObjectInfo() to forcefully change the 'Ordering' attribute. However, this allows a possible situation where two objects could end up with the same order number.Cheers,PaulPS. This is with LLv802 with a Sybase backend.
Paul_Eddie_(PEddie_(Delete)_801545)
I suggest that you re-load the object and verify its order number after you set the ordering. I know that this is not 'elegant' but at least it is quick to fix.Cheers,Paul
Robert_Davies_(unlondonadmin_-_(deleted))
Hi Paul.I'm just now getting around to fixing this problem so I'm trying to implement your suggestion of using UpdateObjectInfo to change the 'Ordering' attribute. However it is not listed as one that can be modified using that function (according to the API docs). Can I still pass it?Also when I am creating documents the one I want to have order 1 is the last one to be added to the compound doc. Can I add documents with order 2, 3, 4, ... when there is no document with order 1?Best regards/matt.