Hi all,
I need some lotusscipt help.
Basically, I have a dialog list which has a number of business groups to select from.
Based on the chosen option, i then need to access details about this business from another one of out databases. Ive kinda attempted doing using LS but using a prompt box instead. Can anyone help me with my code so that im using a dialog list instead of a prompt box??
Here is my code…
If source.IsNewDoc Then
Dim ws As New NotesUIWorkspace
Dim s As New notessession
Dim dbExternal As NotesDatabase
Set dbExternal = s.GetDatabase("Domapps1/Stats","IT\AsTrak.nsf")
Dim viewExternal As NotesView
Set viewExternal = dbExternal.GetView("va_bl")
Dim divisionList As Variant
divisionList = Evaluate(|@Unique(@DbColumn("Notes":"Nocache";"Domapps1/Stats";"IT\AsTrak.nsf";1))|)
divListVal = ws.Prompt(4, "Please select the organisation that you wish to create a check list for...","",divisionList)
Call source.FieldSetText("Checklistname", divListval)
Dim documentcollection As NotesDocumentCollection
Set documentcollection = viewExternal.GetAllDocumentsByKey(divListVal,True)
Dim tasktemplatedoc As NotesDocument
Set tasktemplatedoc = documentcollection.GetFirstDocument
While Not(tasktemplatedoc Is Nothing)
Dim newtaskdoc As New NotesDocument(dbExternal)
With newtaskdoc
.form = "fa_t"
.taskname = tasktemplatedoc.taskname(0)
.TaskCategory = tasktemplatedoc.TaskCategory(0)
.checklistunid = source.document.universalID
.status = "Not Complete"
.assignedto = s.UserNameList(0).abbreviated
End With
Call newtaskdoc.MakeResponse(source.Document)
Call newtaskdoc.Save(True,True, False)
Set tasktemplatedoc = documentcollection.GetNextDocument(tasktemplatedoc)
Wend
Call source.refresh
End If
I need to get this done asap, so if anyone could help me i’d be ever so grateful/
Thanks