Relookup Field Contents

Copies new values from the lookup source field into the current found set.

Options 

  • With dialog specifies whether to display a dialog box when the script step is performed, allowing users to confirm field information.
  • Specify target field specifies the field that is the target of the relookup operation. This field must be the match field for the relationship upon which the lookup is based, not the lookup source field or lookup target field. If no field is selected, Relookup Field Contents returns an error code that can be captured with the Get(LastError) function.

Compatibility 

Product Supported
FileMaker Pro Yes
FileMaker Go Yes
FileMaker WebDirect Yes
FileMaker Server Partial
FileMaker Cloud products Partial
FileMaker Data API Partial
Custom Web Publishing Partial

Originated in version 

6.0 or earlier

Description 

  • The target field specified for the Relookup Field Contents step must be an editable field.
  • Relookups are only performed on the found set of records in the active table.
  • Calculation fields cannot be used for the Relookup Field Contents command. If you use the Relookup Field Contents command, and you're using a calculation field as the matching value, you must specify one of the input fields for the calculation as the field parameter for the Relookup Field Contents.
  • When you use the Relookup Field Contents script step, the data must be committed first before the operation is performed, or you may get unexpected results. See Committing data in records.
  • Server-side scripts, the FileMaker Data API, and Custom Web Publishing run this script step as if the With dialog option is set to Off.

Example 1 

Finds records that have matching values in the Customer ID field, then updates all lookups in the found set based on the relationship that uses Customer ID as a match field.

Copy
Go to Layout ["Invoice Details"]
Find Matching Records [Replace; Invoices::Customer ID]
Relookup Field Contents [With dialog: Off; Invoices::Customer ID]