Reference > Script steps reference > Fields script steps > Insert From Last Visited
 

Insert From Last Visited

Pastes data from the last active record into the specified field in the current record or find request.

See also 

Options 

Select entire contents replaces the contents of a field. If you do not select this option, Insert From Last Visited inserts the result at the insertion point or at the end of the field's existing data.

Go to target field specifies the field to paste into.

Compatibility 

 

Product 

Supported 

FileMaker Pro Advanced 

Yes 

FileMaker Go 

Yes 

FileMaker WebDirect 

Yes 

FileMaker Server 

Yes 

FileMaker Cloud products 

Yes 

FileMaker Data API 

Yes 

Custom Web Publishing 

Yes 

Runtime solution 

Yes 

Originated in 

FileMaker Pro 6.0 or earlier

Description 

Use this script step to ensure consistency and automate data entry. The active record is the last record where FileMaker Pro Advanced performed some activity, such as pasting text or moving into a field with the Go to Field script step.

Notes 

If the specified field does not exist on the layout where the script is being performed, Insert From Last Visited returns an error code which can be captured with the Get(LastError) function.

If you manually select field data before you run this script step in FileMaker WebDirect, the script step performs as if you did not make a selection. To select field data before you run this script step in FileMaker WebDirect, use the Set Selection script step.

Example 1 

Creates a new record and inserts the customer name from the last record that was viewed.

New Record/Request
Insert from Last Visited [Invoices::Customer Name]

Example 2 

Inserts the value from the Customer Name field of the last visited record into a find request, pauses for the user to make modifications, then performs the find.

Enter Find Mode [Pause: Off]
Insert from Last Visited [Invoices::Customer Name]
Pause/Resume Script [Indefinitely]
Perform Find [ ]

Related topics 

Set Field script step

Script steps reference (alphabetical list)

Script steps reference (category list)