Entering commands and formulas

When one cell is selected, you may enter commands and formulas in the Formula box for that cell.

 

Contents  [Hide]

 

Typing or selecting a command

If you know the desired command and its syntax, you can type it into the Formula box. You can look up commands and their syntax in the Template Commands Reference.

Alternately, you can select commands from a list – and check their syntax – by following these steps:

  1. Click the button next to the Formula box. This will display the Paste Function screen:

  1. In the Function category list, click the type of command you are looking for. This will display an abbreviated list of commands that fall within the category you have selected.

If you are not sure which category to select, click All to view a list of all template commands.

  1. In the Paste function list, click the command you want to use.

The syntax for the selected command is displayed below the lists, as shown in this example:

  1. To paste only the name of the command into the Formula box, click Paste.

To paste the command and its syntax into the Formula box, select the Paste parameters check box and then click Paste.

an example of using the Paste parameters check box with the IF command

Verifying command syntax

When the Formula box contains any commands or formulas, clicking on any other cell or on any button (except the button) automatically checks the syntax of your formula. If syntax errors are found, the program alerts you to the problem and highlights the position in the formula where the error was found.

For more information on command syntax issues, see Command Order and Syntax.

Entering a series of commands

To enter a series of commands and formulas in the Formula box, separate successive commands with a colon (:). For example, to display a message and then go to a specified cell, separate the MESSAGE and GOTO commands with a colon as follows:

Message "Hello World" : Goto [J4]

If you use the button to paste commands into the Formula box, it will automatically add colons as necessary.

For more information on entering a series of commands, see Command Order and Syntax.

Undoing changes to the current formula

To undo changes made to the current formula, press the ESC key.

Expanding the Formula box

To expand the Formula box so that you can view more than 2 lines at a time, click the button.

You can also enable step 5 of the Template Wizard to fill the entire screen when you use the button to expand the Formula box. This allows you to view longer formulas without scrolling. To enable this setting:

    1. On Template Wizard step 5, press the CTRL key while clicking the button.

    2. Exit and re-start the SPC Designer module.

These steps add the design_supersize= setting to your Cms.ini.

Displaying simple text or rich text

If the Windows language is English, the Formula box displays only text with no formatting, similar to the Windows NotePad. If the Windows language is not English, the Formula box displays rich text, which provides better support for diacritic characters (such as ä, ç, ø, etc.).

To override the Windows language setting and force the Formula box to display simple text or rich text, add one of the following lines to convert.db:

design_rtf=0

display simple text in the Formula box

design_rtf=1

display rich text in the Formula box

Deleting formulas from one or more cells

You can clear formulas from cells on the grid by selecting one or more cells and then pressing CTRL+L. Or you can right-click a cell and choose Clear formula from the right-click menu.

 

More:

Template Wizard Step 5