Script Steps Reference
Table Of Contents
- Chapter 1 Introduction
- Chapter 2 Control script steps
- Chapter 3 Navigation script steps
- Chapter 4 Editing script steps
- Chapter 5 Fields script steps
- Set Field
- Set Next Serial Value
- Insert Text
- Insert Calculated Result
- Insert From Index
- Insert From Last Visited
- Insert Current Date
- Insert Current Time
- Insert Current User Name
- Insert Picture
- Insert QuickTime
- Insert Object (Windows)
- Insert File
- Update Link (Windows)
- Replace Field Contents
- Relookup Field Contents
- Export Field Contents
- Chapter 6 Records script steps
- Chapter 7 Found Sets script steps
- Chapter 8 Windows script steps
- Chapter 9 Files script steps
- Chapter 10 Accounts script steps
- Chapter 11 Spelling script steps
- Chapter 12 Open Menu Item script steps
- Chapter 13 Miscellaneous script steps
- Appendix A Glossary
Chapter 5
|
Fields script steps 45
Chapter 5
Fields script steps
Fields script steps operate on specific fields. With these script steps, you can:
• paste data into fields
• import information into fields
• evaluate a calculation and assign the result to a field
Set Field
Format
Set Field [<table::field>; <value or formula>]
Options
• Select Specify target field or click Specify to specify the field whose contents you
want to replace. If no field is specified and a field is selected in Browse mode or Find
mode, that field is used.
• Click Specify to define the calculation. In the Specify Calculation dialog box, type the
calculation you want evaluated, or use the field list (on the left) and the functions list
(on the right) with the mathematical and text operators to build the calculation.
Web compatibility
This script step is web-compatible.
Description
Replaces the entire contents of the specified field in the current record with the result of a
calculation. The result of the calculation must match the field type
. For example, you can't
assign a date calculation to a container field.
Notes
• The specified field doesn’t have to be on the current layout.
• If the result of the calculation doesn’t match the target field type, and the validate
option for the field is set to Always, the field will not be set and an error code is
returned (which can be captured with the Get(LastError) function).
• When possible, the Set Field script step makes the record active and leaves it active
until the record is exited or committed. Scripts that use a series of Set Field script
steps should group these steps together if possible, so that subsequent Set Field
script steps can act on the record without having to lock the record, download and
upload data, index the field, and so on, after each individual Set Field script step.
These functions and record level validation are performed after the record has been
exited or committed.