Need clarification about dialogbox and document id

I need help with a little clarification when using a dialogbox within the Notes client. Originally, I had a button on the main document that called the dialogbox via Formula. Then I found this thread that stated you couldn’t do that and have unique document id’s.–>

http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/f17bc6d9eeabb28485257082006ffd27?OpenDocument

I used script instead to call the dialogbox and just to test, have both forms with computed text with the following code. @Text(@DocumentUniqueID)

the results?? The DocumentID is the same on both forms. Can someone clarify please as to why the doc id’s are not different?

The reason for trying to do this is so I can populate some input from the dialogbox to a rtf on the main document.

Any help is appreciated.

Clint

Subject: Need clarification about dialogbox and document id

That case probably does not apply to you. DIALOGBOX is a temporary creation, to get input, it then can replace the same fields in the form opened from with the contents you typed/modified.

What are you attempting?

Subject: RE: Need clarification about dialogbox and document id

Since you asked… My dialogbox runs some code based off what the user inputs and grabs data off of the AS400. I want to return that data to the 1st form, but put it in a Rich Text Field. Since a dialog box doesn’t support a RTF, I was thinking I could place the data in a text field in the dialog box, then right it out to the rich text field on the main document via script by getting the document id of it.

Thanks.

Subject: RE: Need clarification about dialogbox and document id

Be aware that if you change a RTF via script in the background, you may need to 1) save and close your uidoc

  1. update your rtf

  2. save the back end doc

  3. reopen the doc in the ui.

This obviously has implications regarding the user wanting to abandon their changes.

Subject: RE: Need clarification about dialogbox and document id

Correct Michelle, and I have that part of the code already working correctly. Thanks for the tip though.

Subject: RE: Need clarification about dialogbox and document id

Are you creating a new document for the dialogbox?

Dim dialogDoc As New NotesDocument(db)

You use that document in the Dialogbox method parameters (if you don’t specify the document, the current UI document is used by default). The dialog document will stay alive in memory as long as your script (action or agent) is running, so you can extract the values from its fields, but unless you explicitly save it, it will go away when your script is finished.

Subject: RE: Need clarification about dialogbox and document id

Thanks Stan (and Dallas),

That did it!

Subject: Need clarification about dialogbox and document id

Why do you care about the unid of the dialog document?

Subject: RE: Need clarification about dialogbox and document id

Hi Thomas.

I really don’t care about the unid of the dialog, I just had the computed field in there to compare it to the parent visually and see if it was the same.