Problem solve Get help with specific problems with your technologies, process and projects.

How can I get a pop-up window to collect preliminary user information before they can access a form?

There is a form that, when launched, I would like an initial dialog box to pop up to collect some preliminary information prior to the user gaining access to the entire form. Additionally, I would like the same dialog to be presented when the user closes/saves the document to verify these fields maintain the correct information. Can you help direct me in the best way to do this? I'm sure script is the best way to go, but I'm new to scripting so this is a bit of a challenge for me. And help would be appreciated.
The principle of popups, assuming we are speaking here about a Notes interface, is that information entered in fields in these popups can automatically be inherited into the main form from which the popup was called. This is done by using the @DialogBox function, which is exhaustively described in the Designer Help file. Sometimes it is easier to do these things with LotusScript.

I have attached some example code below, to give you a head start. It is important to remember that when you "dialog" a form using LotusScript, you will need to create a document object as well, to be able to read the values the user enters. If you do not do so and do not use this object in the calling method (see below), you would not be able to read any values entered by the user using LotusScript. The method dialog box of the notesUiworkspace, takes a value for a LotusScript NotesDocument object, which will then take the values entered. This method returns a true or false, related to the equivalent [OK] and [Cancel] button on the dialog box that appears to the end user. This allows you to trap if the user actually pressed the [OK] button and, if so, use the data from the dialog box to fill in or process your current document.

Dim s as New notesSession
Dim w as new notesUiWorkspace
Dim db as notesDatabase
Dim tmpDoc as notesDocument
Set db=s.currentDatabase
Set w=New notesUiworkspace
Set tmpDoc=db.createDocument
'open dialog box to enter details for reversing activities
dlgFlag = w.DialogBox( "dlgReverse", True,True,False,False,False,False, "Reversing Activities",tmpDoc,True,False)
If dlgFlag Then
'do your thing on the calling document
End if

Dig Deeper on LotusScript

Join the conversation

1 comment

Send me notifications when other members comment.

Please create a username to comment.

What should the dlgflag be declared as?




  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...