Database Reference
In-Depth Information
new script step, called Set Variable . This step creates a temporary holding place for a
value that'll be used elsewhere in the script.
NOTE
You'll learn more about script variables on Script Variables .
Here's how to write a dynamic find script by using a variable in a Find request.
1. Create a new script called Find This Week's Invoices .
Always use short, descriptive names for your scripts.
2. Move the Set Variable script step into the script list .
It's in the Control section of the script steps list.
3. Click the Specify button .
The “'Set Variable' Options” window appears ( Figure 12-15 ).
4. In the Name field, type $theDate .
Variables' names have to start with a “$” symbol. As with all things FileMaker, the
name should be short and descriptive. In this case, the variable is called $theDate be-
cause there's a function called Date, and you should avoid using function names.
Figure 12-15. To set a variable, you give it a name and tell it what value to store. Both Spe-
cify buttons show the Specify Calculation window, where you can create calculations.
You'll use the first one to set the value most often. The second Specify button lets you put
more than one value into a variable, much like a repeating field can hold multiple rows of
data.
5. In the Value field, type “≥” & Get (CurrentDate) - 7 .
Search WWH ::




Custom Search