You are viewing limited content. For full access, please sign in.

Question

Question

largest value in a field

asked on May 8, 2019

I am working on a document naming process.  We have a metadata field on a template in the repository which contains the document number.  We can easily find all of the documents by way of a search: {LF:LOOKIN="\Testing Directory\Europe\100 Quality, Information Security and Human Resources\Supporting Document"}

I can further narrow down to a single document by way of using a specific document number and adding this to the end of the search: & {[Default]:[Document Number] = "123"}

My issue is that the workflow has no way of finding the largest number in that folder, so while I can use a token calculator to add 1 and assign this newly incremented number to the new document being named, I cannot guarantee that I am incrementing the correct number for the naming process.  Can anyone help with the logic to find the largest value in that metadata field?

Thank you,

Jason

0 0

Answer

SELECTED ANSWER
replied on May 8, 2019

Search Repository has an option to sort entries. You can add your field to the list of document properties retrieved in Search Repository and then use it for sorting in descending order. Then you can restrict the search to return just the first result. That will be the document with the highest value in your field.

1 0
replied on May 8, 2019

Miruna,

Thank you, having self taught myself much of my LF knowledge, this had previously escaped me.  This works perfectly.

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.