Urgent: - Dialog List

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

Subject: Urgent: - Dialog List

Hi Gem,

Check out this code, hope this will give some idea.

Dim ws As New notesuiworkspace

Dim surveydoc As notesdocument

Dim surveyref As String



' ask user what survey to export from list of those surveys with feedback

Dim session As New notessession

Dim db As notesdatabase

Set db = session.currentdatabase

Dim dateTime As New NotesDateTime("22/11/96")

Surveys = listOfSurveys(db.Search({Form="FORMNAME"},dateTime,0))

If Ubound(Surveys) = 0 Then 

	Surveyref = Strright(Surveys(0),"|")

Else 

	Dim export As notesdocument

	Set export = db.createdocument

	export.Surveys = surveys ' list of all known surveys from which user selects one to export

	export.survey = surveys(0)

	x = ws.Dialogbox("(dlgCustomExport)", True, True, False, False, False, False, "Choose Form to Export", export, False, False)

	If x = False Then Surveyref = "" Else Surveyref = export.survey(0)

End If



If surveyref="" Then Msgbox "bla bla" : Exit Sub

HTH,

Gov