We help IT Professionals succeed at work.

Lotus notes coding a button that produces a  pop-up prompt with a drop down.

amenoss asked
I have an existing Lotus notes database form that I am trying to create a button that will help  a certain set of users can click to rapidly fill in some fields. The long story short is that we are not modifying the app itself, rather coding/adding an external button to the users tool bar in notes to do this.

All I am looking to do is with the form the open and in edit mode, is have the user execute the button. Upon clicking it they will get a prompt to select a value from a drop down and click ok, this selected value will then populate a field on the form....once that value is selected several @setfields command execute and populate the form.  I have the setfields commands all working, I am having issues coding the prompt and drop down list (I'm relatively new to notes coding).  I am attempting to use the @prompt() function which at least gets me the pop up, but I am uncertain how to code the drop down list in it.
Watch Question

Easiest would be a @Prompt.
The base is its (simplified) syntax:
ReturnValue := @Prompt( [style] ; title ; prompt ; defaultChoice ; choiceList)
In your case the style [OkCancelCombo] (or [OkCancelList]) will offer you the list of choices.

As I suspect that you might be retrieving the choicelist from a view (@DbLookup / @DbColumn), you could also consider using a @Picklist instead,
Its shows a view in a dialog and returns a (visible or hidden) column value. If the column value is a documents unique id, you could use @GetDocField to obtain more values from the same document.
The 64K limit of a @DbLookup/@DbColumn is often the main reason why people pefer @Picklist over choicelists in @Prompts.


Thanks Crak, the @Prompt syntax clarification is what I needed.  I was able to use the OKCancelList style and hard code my required list in the choice list area, everything is working now.


Thanks to the expert

You're welcome!
Don't you have a copy of the designer help installed? All syntax clarifications are in there!