I have an agent that asks the user to select a document in a list. The list displays the field "Description" of each document available.
After, it peforms an FTSearch to get that document from the same view that was used to build the list.
Say that there are 10 documents to choose from and one of them have the description "Doc 1" and another is "Doc 2". Sometimes when the user selects "Doc 2" it will find the document "Doc 1".
I can't figure out when this happens because somethimes it works correctly and sometimes not.
I tought it was because the user copied "Doc 1" and renamed the copy to "Doc 2". But I tested that and it seems to work.
I also tought it would be because my view was not sorted, so I sorted the description ascending and the error still occured
My view is hidden and contains 2 columns: Description and Structure (In that order)
None of the documents have the same description.
Here is my agent:
Dim View As NotesView
Dim Template As NotesDocument
Dim ws As New NotesUIWorkSpace
Dim s As String
Dim Session As New NotesSession
Set db = session.CurrentDatabase
Set View = db.GetView("vTemplate")
s = ws.Prompt(PROMPT_OKCANCELLIST,"Choice","Choose a template:",,Evaluate("@DbColumn(''; ''; '(LookupTemplate)'; 1)"))
If Trim(s) <> "" Then
s = Chr(34) & s & Chr(34)
Set Template = View.GetFirstDocument
Thanks in advance