PROGRAMMING OVERVIEW AND USER INTERFACE
Examples: Toolbars
1. This toolbar button formula opens the names.nsf database on the doc server to the People view:
@Command([FileOpenDatabase]; "DOC" : "NAMES.NSF"; "People")
2. This toolbar button formula presents the user with the list of databases in a database catalog, and opens the database that the user selects. The first @DbColumn puts a list of the values in column 4 of the Databases by _Replica ID view in the temporary variable titles. The second @DbColumn puts a list of the values in column 2 of the Databases by _Replica ID view in the temporary variable servers. The third @DbColumn puts a list of the values in column 3 of the Databases by _Replica ID view in the temporary variable databases. The temporary variable list combines titles, servers, and databases for presentation to the user in @Prompt. The formula then parses the return value from @Prompt into a server name and database name for inclusion in the FileOpenDatabase @command.
titles := @DbColumn(""; "doc":"CATALOG.NSF"; "Databases by _Replica ID"; 4);
servers := @DbColumn(""; "doc":"CATALOG.NSF"; "Databases by _Replica ID"; 2);
databases := @DbColumn(""; "doc":"CATALOG.NSF"; "Databases by _Replica ID"; 3);
list := titles + " *-* " + servers + " *:* " + databases;
member := @Prompt([OKCANCELLIST]; "Open Database"; "Select a database"; ""; list);
server := @Left(@Right(member; " *-* "); " *:* ");
database := @Right(member; " *:* ");
@Command([FileOpenDatabase]; server:database)
See Also
Toolbars
Glossary
Feedback on
Help
or
Product Usability
?
Help on Help
All Help Contents
Glossary