Manage Learn to apply best practices and optimize your operations.

Picklist In Lotusscript

While running LotusScript you may need some input from a user from a dynamical
With this solution you're able to let a user make a selection from a list,
based on a value which is available in the code.
Eventually the selection can be used within the LotusScript code.

First, create a dummyform with a SaveOptions field on it with value "0".
Add a dummyfield in which from the script data is placed. This field is used to
as key for the list to be generated.
Add another dummyfield which will be used to put in the selection from the user.

On the Postrecalc event of this dummyform add a value (like "No Selection")to
the dummyfield.

Then also on the Postrecalc event generate a list from which the user can
select (like @Picklist or @DbColumn) and put the selection on the dummyfield.
If the user cancelles the selection the initial value remains in the field.

Now, in the script you're running compose a document on your front-end with the
dummyform and refresh it. Now the list is prompted to the user and the
selection is placed into the dummyfield.
You can simply retrieve the value from the dummyfield in the script and close
the document based on the dummyform.
Setuidoc = WS.ComposeDocument( "","","frmPickListCountry" )
Call uidoc.FieldSetTex( "dummyCountry", doc.EnvironmentName(0))
Call uidoc.Refresh

FIELD Country := "NoSelection";
tmp := @PickList( Custom] ; "" ; "ISO" ; "Please, select the correct Country or
press Cancel" ; DummyCountry ; 1);
@If( tmp = ""; ""; @SetField("Country"; tmp ) )

return to the script:
Dim sCountry As String
sCountry = uidoc.FieldGetText( "Country" )
Call uidoc.close
If sCountry <> "NoSelection" Then
Set destdoc = Destview.GetDocumentByKey( sCountry, True )
end if

Dig Deeper on LotusScript



  • 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 ...