Blogs

  • Browse Blogs
  • My Blog
  • My Updates

Tags Help

  • View as cloud  | list

Similar Blogs

photo

Lotus Nut

58 Entries |  Chris Whisonant
Updated 
Ratings 3     Comments 90
photo

Big A** Mutan...

42 Entries |  Michael Smelser
Updated 
Ratings 1     Comments 41
photo

TexasSwede

51 Entries |  Karl-Henry Martinsso...
Updated 
No Ratings 0     Comments 51
photo

Portaldomosph...

21 Entries |  David DeWell
Updated 
No Ratings 0     Comments 10
photo

Book Of Jim

8 Entries |  Jimmy Bracco
Updated 
No Ratings 0     Comments 10

Dogear Bookmarks

off the Hook

Blog Authors:  Scott Hooks   Scott M Hooks  

All entries tagged with development

Forum Friday: Collecting User Input with Custom "P...

Scott Hooks  |    |  Tags:  notes lotus development  |  Comments (0)

Declan pitched the idea of Forum Friday's on his blog about picking a question on Notes.net and responding to it with a blog entry. I think this is a great way to get forum readers into the Domino blogging community, so I gave it a shot. I went to notes.net and picked the first entry I saw without a comment: Create Dialog Box Like Mail Address. I'm not sure if this is what Mr. Dressler is looking for, but it occurred to me that newer developers may not realize the power of @DialogBox or notesuiworkspace.DialogBox in LotusScript (and maybe even some guru's don't think of it). Basically, you can design any form you want and use it as a pop up box to collect or modify information on the underlying form (even if the fields on the underlying form are hidden). This is an effective way to move lesser used and/or non-printed data off of the main form to keep it clean, or to implement an interview-style "wizard" to collect user input in steps. The Lotusscript version can be further used to collect information into documents that are not open or even into a temporary document that is used just to get answers to questions, but never saved. Check it out in the Help file and start improving your user interfaces today.

 

Making a dialog box that does what this user requested should be relatively simple:

  1. Create the form with two fields and a hotspot button between them. Tip: Put your form design elements in a table and use the [SIZETOTABLE] to make the best use of screen space
  2. The first field is an editable single-value listbox field with an @DBLookup of the possible choices. Tip: make this a list of key values with the Doc UNID as an alias (e.g., key value | @DocumentUniqueID)
  3. The second field is a single-value computed text field that equals itself (@ThisValue)
  4. The hotspot button sets the second field to the selected value of the first field (since they only want ONE value).
  5. Add a button to the calling form that runs script that calls notesuiworkspace.DialogBox and then copies the document that was selected using whatever method you want, such as.

Dim workspace As New NotesUIWorkspace

Dim session As New NotesSession

Dim db As NotesDatabase, otherDb As Notesdatabase

Set db = session.CurrentDatabase

'Set otherDb

Dim doc As New NotesDocument(db)

Call workspace.DialogBox( "Form", True, True, False, False, False, False, "Title", doc)

If doc.fieldname(0) <> "" Then

'Set your document, for example

Set doc = db.GetDocumentByUNID(doc.fieldname(0))

Call doc.CopyToDatabase( otherDb )

End If

By running it from the main form in this way, the dialog box becomes just a way to temporarily complete the action then throws away the temporary data AND bails out if the user clicks Cancel or no value is selected (because doc.fieldname(0) will equal "";).

 

There are of course other variations that would work with things like embedded views, etc. If I understand the stated problem correctly though, I'd probably simplify the approach and just use a view picklist to capture the selected document's UNID then do the copy without adding the complexity of a dialog box with a hotspot button.

 

Regardless, the point is that dialog boxes are a powerful and flexible way to collect user input without junking up a main form.


Skip to main content link. Accesskey S
IBM Lotus Connections Help Tools About

Tags

A tag is a keyword that is used to categorize an entry. To view the entries with a particular tag, click a tag name or enter a tag in the box.
The tag cloud indicates the frequency of tag use. Popular tags appear darkest. The slider control adjusts how many tags are displayed in the tag cloud.