Set Selection
Purpose 
Allows the user to specify the starting and ending position of a selection in a field.
Format 
Set Selection [<table::field>; Start Position: <n>; End Position: <n>]
Options 
 •
Select Go to target field or click Specify to specify the field whose contents you want to select.
 •
Specify lets you set the starting and ending positions of a selection, either by entering the start and end numbers directly or by using a calculation to determine them.
Compatibility 
 
Where the script step runs 
Supported 
FileMaker Pro 
Yes 
FileMaker Server scheduled script 
Yes 
FileMaker Go 
Yes 
Custom Web Publishing 
Yes 
FileMaker WebDirect 
Yes 
Runtime solution 
Yes 
Originated in 
FileMaker Pro 6.0 or earlier
Description 
The starting and ending values can be typed in directly or determined via a calculation. If no target field is specified the current active field is used.
Notes
 •
 •
 •
 •
Example 1 
Selects the first 5 digits of the Postal Code field.
Set Selection [Customers::Postal Code; Start Position: 1; End Position: 5]
Example 2 
Selects the number of paragraphs that the user specifies in the custom dialog.
Show Custom Dialog ["How many paragraphs do you want to select?"; Products::Number of Paragraphs]
If [Get ( LastMessageChoice ) = 1]
Set Selection [Products::Description; Start Position: 1; End Position: Position ( Products::Description ; ¶ ; 1 ; Products::Number of Paragraphs )]
End If
Related topics 
Script steps reference (alphabetical list)
Script steps reference (category list)