Manage Learn to apply best practices and optimize your operations.

Creating An Action Button Presenting The User With A Dropdown List Of Options

This entry describes how to add an action button to the action bar, presenting
the user with a drop down list of options.
An example of this is the "Alternate Views of the Entries" button on the main
navigator menu.

I find it easier to have an action bar button run an agent rather than
including the code directly in the button formula.

I will use as an example the "Alternate Views of the Entries" button on the
main navigator menu of this database.
Pressing that button runs an agent: View of Entries that consists of the
following code..
<< First I show the user a list of options, recording their selection in sView>>
sView := @Prompt([OKCANCELLIST]; "Alternate Views of entries"; "Select to view
Entries ..."; "By Category";
"By Category":
"By Title":
"How to create a drop down like this !");

<< Based on the user's selection, I set up the view name>>
sViewName:[email protected](
sView="By Title";"EntriesByTitle";
sView="By Category";"EntriesByCategory";
sView="How to create a drop down like this !";"HowTo";
"EntriesByCategory");

<&LTIn this case I first check whether the use selected the "How To". If so, I
run another agent>>
@If (sViewName="HowTo";@Command([NavigateNext])[email protected]([ToolsRunMacro]
;"ShowHelp")[email protected]("");"");

<&LTIf Not, I change the view as requested>>
@Command([ViewChange];sViewName)

Dig Deeper on Lotus Notes Domino Administration Tools

SearchWindowsServer
Search400
  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/Search400.com community. These cheat ...

SearchDataCenter
SearchContentManagement
Close