APPLICATION DESIGN


Creating programmable tables
There are four types of tables you can create in IBM® Lotus® Domino(TM) Designer:
Because steps for creating a basic, tabbed, or animated table in Designer are the same as for creating tables in the IBM® Lotus® Notes® client, see the topic Creating tables in the Notes Client Help. You can also press F1 for help when you are creating a table.

How programmable tables work

Programmable tables let you create a table that displays one row at a time, based on an action or field formula. A programmable table starts as a tabbed table that looks like a Designer Properties box. One tab, or row, of the table is visible at a time to the user. With regular tabbed tables, the user clicks the tabs at the top of the table to select which row displays. With programmable tables, the user clicks on an action, a link, or an outline entry to select which row appears.

You write a formula in the Script area of the Programmer's pane to control which row displays and to associate the row with an action, link, or outline entry. Include a field in the formula that has the same name as the name you give to the table in the Table Properties box, except precede the field name by a dollar sign ($). Remember that table field names are case-sensitive: $table is a different table field name than $Table.

For example, on your company's home page, you could put a programmable table that displays different information about your company depending on what your site visitors want to see. If they click the "Location Information" hot text they would see the row of the table that gives them the location of your company. If they click the "Company History" hot text they see the row of the table that describes your company's history.

Note When you are designing programmable tables on a form, you can use a field on the form to control the table. You can use a choice list field that refreshes on change or use a computed field.

To create a programmable table

1. Move the cursor to where the table will appear on the page or form. In a document, you must be in a rich-text field.

2. Choose Create - Table. The Create Table dialog box appears.

3. Select the number of rows and columns for the table.


4. Under Table Type, click the programmable table button.

5. Click OK.

6. Select the table. Choose Table - Table Properties.

7. Do the following on the Table Programming tab of the Tables Properties box:

8. (Optional) To display tabs so users can switch rows, select "Also show tabs so user can pick row" on the Table Rows tab.

9. Format the table.

10. Enter text, graphics, or objects in the table.

11. Create links, a button, or an outline entry that will set the fields for the table and control what displays.

Example: Creating hotspots to control a programmable table

1. Create a two-row, two-column, programmable table on a page. Name the table CompanyInfo. Name the first row "a" and the second row "b."

2. Enter text and graphics in each row and column of the table.

3. Enter a line of text on the page (below the table) that is related to what users will see when that row of the table is displayed. Enter a line for each row of the table. For example, if you have a two-row table -- one row has the company location and the other has the company history -- enter two lines of text:


4. Select the text for the first line and choose Create - Hotspot - Action Hotspot.

5. Select the Hotspot Click event in the Objects tab of the Info List in the Programmer's pane.

6. Enter a formula in the Script area of the Programmer's pane that sets the field $CompanyInfo to the name of the row of the table you want to display.


7. Select the second line of text and create a hotspot with the formula:
When users click on the first hotspot they will see the text and graphics in the first row of the table only. When they click on the second hotspot they will see the text and graphics in the second row of the table only.

See Also