Dialogbox

Hi

Does anyone of You knows how to append the text list field on the document with data which is calculated with the dialogbox?

I call the dialogbox without NotesDocument parameter, so it takes the underlying document fields, but I can’t see the result of NotesItem AppendToTextList method.

I can append the fields without the dialogbox but I can’t do this with it.

I hope someone can help me out, I will really appreciate that.

With best regards,

Arek

Subject: Dialogbox

Could you post your code please?

Subject: RE: Dialogbox

Hi

In the document:

Call ws.DialogBox(“x”,True,True,False,False,False,False)

and in the dialogbox:

Dim ws As New NotesUIWorkspace

Dim curDoc As NotesDocument

Set curDoc = ws.CurrentDocument.Document

Dim it As NotesItem

Set it = curDoc.GetFirstItem(“CancelTotalDays”)

If Not it Is Nothing Then

Call it.AppendToTextList(ws.CurrentDocument.FieldGetText(“InterruptionTotalDays”))

End If

Set it = curDoc.GetFirstItem(“CancelFrom”)

If Not it Is Nothing Then

Call it.AppendToTextList(ws.CurrentDocument.FieldGetText(“InterruptionFrom”))

End If

Set it = curDoc.GetFirstItem(“CancelTo”)

If Not it Is Nothing Then

Call it.AppendToTextList(ws.CurrentDocument.FieldGetText(“InterruptionTo”))

End If

and if i do this in the document itself in some button then it worked, but not in the dialogbox

I appreciate Your help.

With best regards,

Arek

Subject: Dialogbox

I solved the problem like the following:


Set doc = db.CreateDocument

If  ws.DialogBox("x",True,True,False,False,False,False,"test",doc,True,False,False) Then

Dim it As NotesItem

	Set it = curDoc.GetFirstItem("CancelTotalDays")

	If Not it Is Nothing Then

		Call it.AppendToTextList(Cstr(doc.InterruptionTotalDays(0)))

	End If

	Set it = curDoc.GetFirstItem("CancelFrom")

	If Not it Is Nothing Then

		Call it.AppendToTextList(Cstr(doc.InterruptionFrom(0)))

	End If

	Set it = curDoc.GetFirstItem("CancelTo")

	If Not it Is Nothing Then

		Call it.AppendToTextList(Cstr(doc.InterruptionTo(0)))

	End If

End If

and some comments:

db - current database

doc new document

x - some form with the fields, which values we want to put in the text field ( f.ex. doc.InterruptionFrom(0))

Of course to be sure that the value will be put as string, there is a Cstr method.

I hope it will help anyone

With best regards,

Arek