I’ve a code that search data from a view. If I use a @dbColumn Evaluate code it works fine, if I use a @dblookup Evaluate code, it returns a “Variant does not contain a conteiner”.
This is the @dbcolumn code solution:
Dim obj_s As New NotesSession
Dim obj_ws As New NotesUIWorkspace
Dim obj_uidoc As NotesUIDocument
Dim obj_list As Variant
Dim v_list As String
Dim v_question As String
Dim v_view As String
Set obj_uidoc = obj_ws.CurrentDocument
v_question = "Prompt message:"
v_view = "NCfasi"
obj_list = Evaluate({@DbColumn("":""; "":""; "} & v_view & {" ; 2)})
v_list = obj_ws.Prompt(PROMPT_OKCANCELLIST,"system", v_question, obj_list(0), obj_list)
and it works fine.
This is the @dblookup solution:
Dim obj_s As New NotesSession
Dim obj_ws As New NotesUIWorkspace
Dim obj_uidoc As NotesUIDocument
Dim obj_list As Variant
Dim v_list As String
Dim v_question As String
Dim v_view As String
Dim v_field As String
Set obj_uidoc = obj_ws.CurrentDocument
v_question = "Prompt Message:"
v_view = "NCfasi"
v_field = obj_uidoc.FieldGetText("nc_txtRilProces")
obj_list = Evaluate({@DbLookup("":""; "":""; "} & v_view & {" ; "} & v_field & {";2)})
v_list = obj_ws.Prompt(PROMPT_OKCANCELLIST,c_testatasistema, v_question, obj_list(0), obj_list)
Call lfn_SetField(v_list, obj_uidoc)
This don’t work and returns the error.
Whe i try to debug code, the obj_list leaves empty.
Wow. Your code is very difficult to read with all of that white space – it’s hard to follow the lines across the tab gap.
Don’t use “”:“” for the database; use “” instead. Same goes for the protocol:cache part – “” will do. The difference, though, is that it’s optional in the first argument, “” means something different from “”:“” in the database argument. “” by itself means “use the current database”, while “”:“” means use the current database file path, but on the local machine.