Adding actions to navigators
About this task
After you add objects to a navigator, you automate the objects by attaching actions to them. For example, to program a graphic button so that it opens a particular view when a user clicks it, select Run: Simple Actions and then choose "Open a view or folder" in the Action field of the Programmer's pane. Then select a particular view in the Programmer's pane.
Simple actions for navigators
Procedure
Action: Open a view or folder
Procedure
Action: Alias a folder
Procedure
Action: Open another navigator
Procedure
Action: Open a link
Procedure
Action: Open URL
Procedure
Custom actions
Procedure
To attach an action
Procedure
- Create a new navigator, or open an existing navigator.
- Select a navigator object.
- In the Programmer's pane, click "Run: Simple action(s)."
- Select the simple action to run and supply any required information.
- Close and save the navigator.
To attach a formula or script
Procedure
- Create a new navigator, or open an existing navigator.
- Select the navigator object.
- To add a formula, select "Run: Formula" in the Programmer's pane. Then, type the formula and click the green check mark to confirm it.
- To add a script, select "Run: LotusScript®" in the Programmer's pane. Then, write the LotusScript® program.
- Close and save the navigator.
Results
For more information on writing formulas and scripts for buttons and hotspots, see the Domino® Designer Programming Guide.
Examples
Procedure
Opening a view
Procedure
Creating a navigator object that opens a navigator
About this task
A navigator object (such as a button) that switches to another navigator is a graphical way to guide users through a series of decisions to reach the information they need.
This navigator displays a bar chart created in 1-2-3®.
To find out more information, users click a bar that represents an area's sales. Each bar in the first navigator is a hotspot rectangle that takes users to the Weekly Details by Country navigator. When users reach the second navigator, they see another bar chart that displays weekly sales by individual country. Clicking a bar in this chart opens the view for the country (for example, View by country\France). Each bar in the second navigator is a hotspot rectangle whose "Open a view or folder" action specifies the appropriate country view.
Creating a shortcut navigator with an @function formula
About this task
This shortcut navigator allows users to click the icon instead of using the Create menu to create a new Action Item document.
The action for the icon is "Run a formula" with the formula:
@Command([Compose];"";"3. Action Item")
Making a navigator object that runs a LotusScript® program
About this task
When users double-click the navigator object (for example, a button), this script opens the current database:
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Call db.Open("", "")
Messagebox(db.Title & " " & db.FileName)
If db.IsOpen = True Then msg$ = "open" Else msg$ = "closed"
Messagebox("Database is " & msg$)
End Sub