How to get the latest document created by category in View using lotus notes @formula?
How to get the latest document created by category in View using lotus notes
2.2k views Asked by user335160 At
2
How to get the latest document created by category in View using lotus notes @formula?
Since you are using @formula language, I assume you need to get data from the document and not the NotesDocument object (for which you would need to write LotusScript).
If this is the case, I would suggest using
@DbLookup
function with a hidden view (view name surrounded in parentheses) with first sorted column - the category you'll use and second sorted column - the function@Created
, sorted descending, so the first matching document is the most-recent one.You can use the
@DbLookup
to retrieve any non rich-text field from the document, or a pre-calculated value from the third (fourth, etc.) column (which could also include plain text, extracted from a rich-text field).To be sure you access the most-recently created document that matches your criteria, the view would need to refresh automatically and you will need to specify
"NoCache"
in the@DbLookup
. It could look something like:Does this help you achieve what you're trying to do?