Manage Learn to apply best practices and optimize your operations.

Calling An @Prompt In Lotusscript

Often when writing involved LotusScript agents, I find myself needing just a
little bit of user input- like the type that an @Picklist or an @Prompt could
deliver. With simple input, developing your own form seems like overkill.
Writing the whole agent in @functions, however, is cumbersome. This is a
classic case of needing to combine LotusScript with an @function side-effect,
something that the documentation says you can't do. By doing the following,
however, you can bend rules a bit.

1. Create an editable, Hidden Text &LTfield> somewhere on a form which will be
used by the current document

2. In the Input Translation event, place the following code:

@If(&LTfield> = "Something"; "Continue";@Return(""));
@Prompt([OkCancelEdit];"Great Lies";"Enter a benevolent person";"My Boss")

(or alternatively, an @Picklist or something of that ilk)

3. In your LotusScript, when you want the @Prompt to be kicked off, execute the
following code:

Dim ws as New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set uidoc = ws.CurrentDocument
Call uidoc.FieldSetText("&LTfield>", "Something")
Call uidoc.Refresh()
TheAnswer = uidoc.FieldGetText("&LTfield>")

This trick sure beats creating a dialog box for every eventuality- and it is
the *only* way I can think of to kick off an address dialog box in code...

Dig Deeper on LotusScript

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials'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 ...