VERIFIED SOLUTION i
X

Retrieving list of invoices by decending order in EngageOne Vault

UPDATED: August 1, 2018


Invoices can be retrieved in descending order. Keys in an index are physically sorted in ascending order.Normally searches will also return keys in ascending order.This can be changed on an index by setting the backwards 'b' flag on the index in 'database.ini'. For information on flags, refer
section 'Indexing' in the Vault Customization guide.

For example, the default invlink (dates under account) index uses the backwards flag so that the documents under the account appear 'most-recent' first.

Index<n>=invlink,doc.date,xdhasb,Dates under this account

This needs to be done in 'database.ini'. Recommend to update the equivalent settings in the profile (under 'profile.ini') to match though that is not strictly required. Adding or removing the backwards 'b' flag to an existing index does not require re-indexing. The format of the index on disk remains the same. The flag just tells the server to start from the last index entry and move backwards instead of starting from the first entry and moving forward. However there will be a need to stop and start Vault Services for the change to take effect.

Limitation:
  • In case documents tried to be retrieved, in date sorted order from an index that is not date-sorted, that is not going to work.
  • The backwards flag does not physically sort keys in reverse order in the index, it just traverses the list in backwards from the last key. This means this particular flag can be changed after an index has been created. This is not so for all flags.
  • On API side, there is no explicitly settings to change the order.
Note: Vault compares the text values in question (with some punctuation removed). So "123" is lower than "50". This may affect the sort results depending on the format of the reference numbers in this case.

Downloads

  • No Downloads