GCC Media: How to Create tables , in: Notes RNext beta 4 Help, Lotus Software 2001.

THEMES: GCC Media\Miscellaneous ...
YEAR: 2001
Login Login
User: Anonymous

TIME: 2001
Creating tables
There are four types of tables you can create in Designer:
  • Basic tables -- Tables with a designated number of columns and rows.
  • Tabbed tables -- Tables that let users switch rows by clicking on tabs at the top of the table.
  • Animated tables -- Tables that switch rows at an interval you designate.

    Note that animated tables do not work on the Web. Also, animated tables on forms are not designed for field entry.

  • Programmable tables -- Table that switch rows based on an action or field formula.

Because steps for creating a basic, tabbed, or animated table in Designer are the same as for creating tables in the Notes client, see the instructions in "Creating tables" in the Notes Client Help.

Programmable tables

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 to control which row displays and to associate the row with an action, link, or outline entry. When writing this formula (in the Programmer's pane) include a field 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). Keep in mind, when writing the formula, 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 have the option of using a field on the form to control the table. You can use a choice list field that refreshes on change or computed field.

To create a programmable table

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

2. Choose Create - Table.

3. Click the programmable table button.

4. Select the number of rows and columns you want in the table.

    Note All columns in a row will appear when the row is displayed.

5. On the Table Programming tab of the Tables Properties box:
      • In the Table HTML Tags field, enter a Name/ID for the table.
      • Click on each row of the table and enter a name for each row in the Row Tags field.
6. (Optional) To display tabs for the user to use to switch rows, select "Also show tabs so user can pick row" on the Table Rows tab.

7. Format the table. For more information about formatting tables, see "Formatting and customizing tables" in Notes Client Help.

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

9. 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:

    Our company locations

    Our company history

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

5. Click 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.

    FIELD $CompanyInfo:= "a";


7. Select the second line of text and create a hotspot with the formula:

    FIELD $CompanyInfo:= "b";


When users clicks 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.