Database Reference
In-Depth Information
and Paste to learn why you should rarely use these commands.) You also get a “Go to target
field” option, through which the script can tell FileMaker which field to act on. If it's not
turned on, then it uses the current field —the one that's active when the step runs.
The Paste step is the most complicated of these four. In addition to specifying the field you
want, and whether or not to select everything in the field before pasting, you get an option to
“Paste without style.” When you turn this option on, FileMaker pastes the text on the Clip-
board but throws away any style information.
Selecting Text
FileMaker has two script steps to help you select text. The first, called Select All , selects
everything in the current field, just like the Edit→Select All command. If you need more
control, then use Set Selection instead. This step has two options. First, you can specify a
target field so that FileMaker operates on the current field. The step also has a separate Spe-
cify button (unlabeled, but below the one associated with “Go to target field”) that brings up
the Specify Set Selection window ( Figure 12-3 ).
Figure 12-3. This window lets you tell FileMaker exactly what text you want the script to select.
You can type numbers directly in the Start Position and End Position boxes, or click either Specify
button to bring up the Specify Calculation window.
If you imagine the text in your field as a string of letters, numbers, spaces, and punctuation,
then you can pretend each of these is numbered. For instance, the word “Avengers” has let-
ters numbered one through eight. You tell FileMaker where the selection will start by putting
the number of the first character you want selected in the Start Position box. Next, you put
the number of the last character in the End Position box. When the step runs, FileMaker goes
from start to end and selects everything in between. See the box below to learn how to posi-
tion the insertion point in a field.
Search WWH ::




Custom Search