I’m building a form which will populate information about documents selected by the user.
I have fields which pulls current live information from using the DBLookup. 1 field I want it to display the UNID for that document, which the user chose.
Rather than trying to grab the value of the ID programmatically by using @Text(@DocumentUniqueID) in the @DbLookup, use the same formula in a column in the view “ARBTS”. Then, just specify the column number in your @DbLookup.
Maybe this LS could help. It works from a view by selecting one or more documents and displays the results, universalID, in the status bar for each doc selected. You can change it to your needs.
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
Dim universalID As String*32
Set db = session.CurrentDatabase
Set collection = db.UnprocessedDocuments
Set doc = collection.GetFirstDocument()
While Not (doc Is Nothing)
Print doc.UniversalID
Set doc = collection.GetNextDocument(doc)
Wend