”] Options • Get related record from lets you select the source relationship from a list of tables in the current database.Description Suppose you have an Invoices table that's related to a Customers table and you're currently looking at a particular invoice. In the Invoices table, you have a button that's set to Go to Related Record [Customers]. Clicking this button determines which customer record your current invoice is related to and immediately goes to that record in the Customers table. If the record in question is not currently in the Customers table’s found set, the script can perform a find to make the record current.
Go to Portal Row Purpose Navigates among the rows in the active portal. Format Go to Portal Row [] Options Specify lets you choose from the following options. • First moves to the first row in the portal. • Last moves to the last row in the portal. • Previous moves to the previous row in the portal. Exit after last tells FileMaker Pro to exit the loop or the enclosing script. • Next moves to the next row in the portal.
Go to Object Purpose Moves to the specified object on the current layout. Format Go to Object [Object Name: "
Go to Field Purpose Moves to the specified field on the current layout. Format Go to Field [Select/perform; ] Options • Select/perform tells FileMaker Pro to perform an action on the contents of a field. All text in a field is selected with this option. The contents of the field (sound, movie, or OLE) determine what action is performed. If the field contains a sound, then the sound is played. If the field contains a movie, the movie is played.
Go to Next Field Purpose Moves to the next field in the tab order of the current layout. Format Go to Next Field Options None. Compatibility This script step is also supported in web publishing and in a FileMaker Server scheduled script. Originated in FileMaker Pro 6.0 or earlier Description If no field is selected when this script step is performed, this script step moves to the first field in the tab order of the current layout.
Compatibility This script step is also supported in web publishing and in a FileMaker Server scheduled script. Originated in FileMaker Pro 6.0 or earlier Description If no field is selected when this script step is performed, this script step moves to the last field of the tab order of the current layout. If a field is formatted as a button, the field object is selected, not the button object.
Related topics Script steps reference (alphabetical list) Contents Enter Find Mode Purpose Switches to Find mode, where you can search for sets of records. Format Enter Find Mode [Restore; Pause] Options • Pause temporarily stops the script to allow the user to enter a find request. • Specify find requests allows you to create and edit requests for use with this script step. Compatibility This script step is also supported in web publishing and in a FileMaker Server scheduled script.
Enter Preview Mode Purpose Switches to Preview mode, where you can see how records, forms, or reports will look when they're printed. Format Enter Preview Mode [Pause] Options Pause temporarily stops the script to allow you to examine the preview result before proceeding with the next step in the script. Compatibility This script step is: • not supported in web publishing • not supported in a FileMaker Server scheduled script Originated in FileMaker Pro 6.
Format Undo/Redo [Undo; Redo; Toggle] Options Undo reverses the previously performed action in the file. Redo restores the previously undone action in the file. Toggle switches between the two most recently performed actions in the file. Compatibility This script step is also supported in web publishing and in a FileMaker Server scheduled script. Originated in FileMaker Pro 6.0 or earlier Description Multiple actions can be undone by repeatedly executing this script step with the Undo option.
Originated in FileMaker Pro 6.0 or earlier Description This script step removes the contents of the field. To duplicate the field information, use the Copy script step. Note In a web-published database, use a Commit Record/Request script step after a Cut script step to update the record in the browser window. Examples The following example takes notes from a "Recent Notes" field and pastes them at the end of a "Previous Notes" field (creating a history of notes).
Examples Find All Copy [Select; Table1::RandomTimesNumber] Paste [Select; Table1::SortNumber] Replace Contents [No dialog; Table1::SortNumber] Sort Records[Restore, No dialog] Commit Records/Requests [] Related topics Script steps reference (alphabetical list) Contents Paste Purpose Pastes the contents of the Clipboard into the specified field in the current record.
Examples Go to Record/Request/Page [First] Copy [Select; Invoices::Company Name] Go to Record/Request/Page [Next; Exit after last] Paste [Select; No style; Invoices::Company Name] Related topics Script steps reference (alphabetical list) Contents Clear Purpose Deletes the contents of the specified field in the current record. Format Clear [Select; ] Options • Select entire contents deletes the entire contents of a field.
Related topics Script steps reference (alphabetical list) Contents Set Selection Purpose Allows the user to specify the starting and ending position of a selection in a field. Format Set Selection [Start Position: ; End Position: ] Options • Select Go to target field or click Specify to specify the field whose contents you want to select.
Examples Go to Layout [“Data Entry”] Set Selection [Table1::Account Number; Start Position: 5; End Position: 10] Copy [] Related topics Script steps reference (alphabetical list) Contents Select All Purpose Selects the entire contents of the current field. Format Select All Options None. Compatibility This script step is also supported in web publishing and in a FileMaker Server scheduled script. Originated in FileMaker Pro 6.
Perform Find/Replace Purpose Finds/replaces data according to the options in the Specify Find/Replace dialog box. Format Perform Find/Replace [No dialog; “”; ””; Find Next/Replace & Find/Replace/Replace All] Options • Perform without dialog prevents display of the Find/Replace Summary dialog box at the end of the find/replace operation. This option also prevents display of the confirmation dialog box when a Replace All operation is executed.
Fields script steps Fields script steps operate on specific fields. With these script steps, you can: • paste data into fields • import information into fields and export data from fields • evaluate a calculation and assign the result to a field Set Field Purpose Replaces the entire contents of the specified field in the current record with the result of a calculation.
Examples The following example calculates 7 percent of the Salary field and assigns the result to the field SDI. Note that Set Field works whether or not the field is on the active layout. Set Field [Table1::SDI; Salary * .07] Related topics Script steps reference (alphabetical list) Contents Set Field By Name Purpose Replaces the entire contents of a calculated target field in the current record with the result of the calculated value.
• When possible, the Set Field By Name 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 By Name script steps should group these steps together if possible, so that subsequent Set Field By Name 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 By Name script step.
Example 5 This example uses a field name contained in a variable to calculate temperatures. A user enters the temperature in field F or field C and runs the script in order to convert temperatures between Fahrenheit and Celsius.
Notes • This script step affects the definition of the field you specify instead of the actual contents of the field that you specify. • This script step can operate on multiple files. If you specify a field in another file, then FileMaker Pro attempts to update the serial number for the specified field in the other file. To specify a field in another file, define a relationship to that file and use Specify target field to select a field from that file.
Description This script step pastes text that is specified in the script, instead of text provided by the user. Notes • This script step is intended to paste text into text field types. To insert other types of data into other types of fields, use either the Insert Calculated Result script step or the Set Field script step. • If the specified field does not exist on the layout where the script is being performed, Insert Text returns an error code which can be captured with the Get(LastError) function.
Originated in FileMaker Pro 6.0 or earlier Examples The following script switches to a specific layout, pastes the current user name, then switches to a different layout. Note that Insert Calculated Result only works when the field is on the active layout.
Notes • If the specified field does not exist on the layout where the script is being performed, Insert From Index returns an error code which can be captured with the Get(LastError) function. • If you have turned indexing off for a field and deselected the option to Automatically turn indexing on if needed, the index will not display and an error code is returned. For more information on field indexing see Defining field indexing options.
Description Use this script step to ensure consistency and automate data entry. The active record is the last record where FileMaker Pro performed some activity, such as pasting text or moving into a field with the Go to Field script step. Note 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.
Originated in FileMaker Pro 6.0 or earlier Examples Go to Record/Request/Page [First] Enter Find Mode [] Insert Current Date [Select; Invoices::Invoice Date] Related topics Script steps reference (alphabetical list) Contents Insert Current Time Purpose Pastes the current system time into the specified field. Format Insert Current Time [Select; ] Options • Select entire contents replaces the contents of a field with the current time.
Insert Current User Name Purpose Pastes the current user name into the specified field in the current record. Format Insert Current User Name [Select; ] Options • Select entire contents replaces the contents of a field with the current user name. If you do not select this option, Insert Current User Name adds the value of the current user name to the end of the field's existing data. • Select Go to target field or click Specify to specify the field to paste into.
Insert Picture Purpose Imports a graphic from another file into the current container field. Format Insert Picture [Select; ] Options • Store only a reference to the file instructs FileMaker Pro to store only a link to the graphic file instead of the entire file. This option may reduce the size of your FileMaker Pro file, but if you move or delete the graphic, FileMaker Pro won't be able to display it.
Insert QuickTime Purpose Imports a QuickTime movie or sound file into the current container field. Format Insert QuickTime [“”] Options Select Specify source file or click Specify to display the Open dialog box where you can specify the name, file type, and location of the QuickTime file you intend to insert. Compatibility This script step is: • not supported in web publishing • not supported in a FileMaker Server scheduled script Originated in FileMaker Pro 6.
Insert Object (Windows) Purpose Embeds or links an OLE object in the current container field. Format Insert Object [“
Insert File Purpose Imports a file or a reference to a file into the current container field. Format Insert File [Reference; ; “”] Options • Store only a reference instructs FileMaker Pro to store only a link to a file in the container field instead of the entire file. This option may reduce the size of your FileMaker Pro file, but if you move or delete the file being referenced, FileMaker Pro won't be able to display it.
Update Link (Windows) Purpose Updates the OLE link (manual or automatic) in the current container field. Format Update Link [] Options Select Go to target field or click Specify to specify the field to be updated. Compatibility This script step is: • not supported in web publishing • not supported in a FileMaker Server scheduled script Originated in FileMaker Pro 6.0 or earlier Description If the field does not contain an OLE link, then this script step does not return an error code.
Options • Perform without dialog prevents display of the Replace Field Contents dialog box when the script step executes. • Select Go to target field or click Specify to specify the target field for the replace operation. • Click Specify to display the Replace Field Contents dialog box, where you can determine the settings required for the Replace Field Contents command.
Related topics Script steps reference (alphabetical list) Contents Relookup Field Contents Purpose Copies new values from the lookup source field into the records that make up the current found set. Format Relookup Field Contents [No dialog; ] Options • Perform without dialog prevents a dialog box from displaying when the script step executes that lets the user confirm field information.
Related topics Script steps reference (alphabetical list) Contents Export Field Contents Purpose Exports the contents of a single field in the active record to a new file. Format Export Field Contents [; “”] Options • Select Specify target field or click Specify to specify the field to be exported. If no field is specified, FileMaker Pro will export the contents of the current field in the active table.
Records script steps Records script steps affect specific records and find requests. Use these script steps to: • add, delete, and copy records or find requests • change field contents in all records in the found set • commit and revert records • import and export records • save records to various formats New Record/Request Purpose In Browse mode, creates a new, blank record. In Find mode, creates a new find request. Format New Record/Request Options None.
Format Duplicate Record/Request Options None. Compatibility This script step is also supported in web publishing and in a FileMaker Server scheduled script. Originated in FileMaker Pro 6.0 or earlier Description If the record has a field set up for automatic entry of values, this script step does not duplicate the value in the field of the current record. In that case, FileMaker Pro generates and enters a new value for the duplicated record.
Compatibility This script step is also supported in web publishing and in a FileMaker Server scheduled script. Originated in FileMaker Pro 6.0 or earlier Description To delete Do this A master record Make sure that the record you want to delete is active (use navigation script steps), and then use Delete Record/Request. If the current layout contains a portal, use Exit Record/Request to make sure that no related record is selected, then use Delete Record/Request.
Compatibility This script step is also supported in web publishing and in a FileMaker Server scheduled script. Originated in FileMaker Pro 6.0 or earlier Description Use the Go to Portal Row script step to control which row is selected. (If no portal row is selected, nothing happens when this script step executes.) Important You cannot undo a Delete Portal Row script step.
Important You cannot undo a Delete All Records script step. Examples Perform Find [Restore] Omit Delete All Records Perform Script ["Data Entry"] Related topics Script steps reference (alphabetical list) Contents Open Record/Request Purpose Makes an existing record or find request available for editing. Format Open Record/Request Options None. Compatibility This script step is also supported in web publishing and in a FileMaker Server scheduled script. Originated in FileMaker Pro 6.
Examples Perform Find [Restore] Go to Record/Request/Page [Last] If [IsEmpty(script examples::Field1)] Open Record/Request End If Related topics Script steps reference (alphabetical list) Contents Revert Record/Request Purpose Returns the current record or request to the way it was before you began adding or changing data in the record.
Commit Records/Requests Purpose Commits a record. Format Commit Records/Requests [No dialog] Options Skip data entry validation overrides any data entry validation options set for fields and commits the record anyway. This option only skips validation for fields set with the Only during data entry validation option in the Options for Field dialog box; fields set to Always validate will still validate, even if the Skip data entry validation option is selected.
Copy Record/Request Purpose Copies the values of a record or find request to the Clipboard. Format Copy Record/Request Options None. Compatibility This script step is also supported in web publishing and in a FileMaker Server scheduled script. Originated in FileMaker Pro 6.0 or earlier Description Text fields are copied in tab-delimited format, without styles, in the order they appear in the record layout. Text in container fields is also copied.
Copy All Records/Requests Purpose In Browse mode, copies the values of all records to the Clipboard. In Find mode, copies all find requests. Format Copy All Records/Requests Options None. Compatibility This script step is also supported in web publishing and in a FileMaker Server scheduled script. Originated in FileMaker Pro 6.0 or earlier Description Text fields are copied in tab-delimited format, without styles, in the order they appear in the record layout. Text in container fields is also copied.
Import Records Purpose Imports records from another file or data source you specify. Format Import Records [No dialog; “
• Specify import order tells FileMaker Pro to use a predefined import order. The last import order used in the file appears as the default and can be edited. This option also lets you choose whether to keep repeating field data together or to split repeating fields into separate records, as well as whether to add new records, replace data in the current found set, or import data as a new table.
Notes • When using the Import Records script step or Export Records script step in a FileMaker Server scheduled script, keep the following in mind: • Any specified file must be in the FileMaker Server Documents folder, the temporary folder, or a child folder of either the FileMaker Server Documents folder or the temporary folder. For example, the following are all valid paths for file.csv: /file.csv /file.csv /Folder1/file.
Export Records Purpose Exports records to a specified file. Format Export records [No dialog; “
Description You can set the export order before adding this script step, or perform the step with a dialog box so a user can set new criteria. Export Records exports all the records currently being browsed. If you want to limit the set of records you're exporting, use a find request before using Export Records.
Save Records As Excel Purpose Saves records to a specified Excel or Excel 2007/2008 worksheet. Format Save Records As Excel [No dialog; “
Related topics Export Records script step Import Records script step Script steps reference (alphabetical list) Contents Save Records As PDF Purpose Saves records to a specified PDF file. Format Save Records As PDF [Append; No dialog; “
Compatibility This script step is: • not supported in web publishing • not supported in a FileMaker Server scheduled script • not supported in runtime solutions Originated in FileMaker Pro 8.0 Description This script step operates in all modes except Find mode. Note (Mac OS) For runtime solutions, you can choose to print records as a PDF file, and the script will be saved with the printed file. Examples Go to Layout ["Layout #4"] Save Records As PDF [No dialog, "Contacts.
Compatibility This script step is: • not supported in web publishing • not supported in runtime solutions Originated in FileMaker Pro 11.0 Description This script step operates in all modes except Find mode. To send a snapshot link file via SMTP, use the Send Mail script step with the snapshot link file as an attachment, and place it after the Save Records As Snapshot Link script step in the script.
Found Sets script steps With Found Sets script steps, you can: • specify a find request to find records • extend or constrain the found set • modify the most recent find request • show all records • omit records from the found set • sort and unsort records Perform Find Purpose Enters Find mode and finds records that match one or more find requests that you set up, that are stored with the script step.
• To delete existing criteria, select the line containing the field and criteria from the top of the dialog box and click Remove. Compatibility This script step is also supported in web publishing and in a FileMaker Server scheduled script. Originated in FileMaker Pro 6.0 or earlier Description If you do not create a find request, this script step will perform the last find request that was executed.
Perform Quick Find Purpose Finds records that match one or more search words based on text that you specify or text returned by a calculation formula. Format Perform Quick Find [] Options Click Specify to specify the search text in the Specify Calculation dialog box. Type the search text or use a calculation function that returns the text to use for the search. Compatibility This script step is also supported in web publishing and in a FileMaker Server scheduled script. Originated in FileMaker Pro 11.
Constrain Found Set Purpose Narrows the existing found set using the criteria you specify in the stored find request. Format Constrain Found Set [Restore] Options Select Specify find requests or click Specify to create and store a find request with the script step. Compatibility This script step is also supported in web publishing and in a FileMaker Server scheduled script. Originated in FileMaker Pro 6.0 or earlier Description This script step is equivalent to a logical AND search.
Originated in FileMaker Pro 6.0 or earlier Description This script step is equivalent to a logical OR search. Examples Go to Layout ["Data entry"] Extend Found Set [Restore] Sort Records [Restore; No dialog] Related topics Script steps reference (alphabetical list) Contents Modify Last Find Purpose Changes the most recent find request. Format Modify Last Find Options None. Compatibility This script step is also supported in web publishing and in a FileMaker Server scheduled script.
Related topics Script steps reference (alphabetical list) Contents Show All Records Purpose Finds all the records in the table underlying the foreground window and leaves you in the current record. Format Show All Records Options None. Compatibility This script step is also supported in web publishing and in a FileMaker Server scheduled script. Originated in FileMaker Pro 6.0 or earlier Description Use this script step to redisplay all the records after working with a found set.
Show Omitted Only Purpose Finds the records not in the current found set. Format Show Omitted Only Options None. Compatibility This script step is also supported in web publishing and in a FileMaker Server scheduled script. Originated in FileMaker Pro 6.0 or earlier Description Use this script step in Browse mode or Preview mode. If you perform this script step in Find mode or Layout mode, FileMaker Pro switches to Browse mode after the records have been found.
Compatibility This script step is also supported in web publishing and in a FileMaker Server scheduled script. Originated in FileMaker Pro 6.0 or earlier Description This script step temporarily hides the current record. Omit Record only operates in Browse mode and Find mode. When this script step is performed in Find mode, it causes the find request to become an Omit request, as if the Omit checkbox had been selected.
Originated in FileMaker Pro 6.0 or earlier Description This script step temporarily hides the omitted records. If this script step is performed from Layout mode, FileMaker Pro switches to Browse mode after the script step has been performed. Examples Perform Find [Restore] Omit Multiple Records [No Dialog, 3] Related topics Script steps reference (alphabetical list) Contents Sort Records Purpose Sorts the records in the current found set according to specified criteria.
Note Items in the sort order that aren’t valid when the script step is performed are ignored. When you specify a sort order in a database containing multiple tables, FileMaker Pro stores the table name for each sort field in the sort order. For example, a sort order using the Last Name field of the Contacts table is stored in the sort order as Contacts::Last Name.
Examples Sort Records [Restore; No dialog] Go to Layout ["Sales Summary"] Enter Preview Mode [Pause] Go to Layout [original layout] Enter Browse Mode [] Unsort Records Go to Record/Request/Page [First] Related topics Script steps reference (alphabetical list) Contents FILEMAKER SCRIPT STEPS REFERENCE 94
Windows script steps Windows script steps affect screen elements and windows. You can: • open or close a window • select a window • arrange windows • move or resize a window • update or freeze a window • freeze a window • scroll a window • show or hide a window, the status toolbar, or the text ruler • set the title of a window • set the zoom level • view data as a list, table, or form New Window Purpose Creates a new window based on the foreground window.
Compatibility This script step is also supported in web publishing and in a FileMaker Server scheduled script. Originated in FileMaker Pro 6.0 or earlier Description The new window has the same layout, same table, same found set, and same current record as the original window. Notes • Window names created with the New Window script step do not have to be unique. • Window name selection is not case-sensitive. • It is not necessary to enter values for each option.
Options • Click Current Window to bring the active window of the file that contains the script to the foreground. • Click Specify to select which window you want FileMaker Pro to bring to the foreground. You can enter literal text or click Specify to generate a name from a calculation. • Select Current file only to restrict matches to the current file (not selecting this option matches all available FileMaker Pro files).
Close Window Purpose Closes the currently active window or any other window by name. Format Close Window [Current window or Name: ; Current file] Options • Click Specify to select which window you want FileMaker Pro to close. You can enter literal text or click Specify to generate a name from a calculation. • Select Current file only to restrict matches to the current file (not selecting this option matches all available FileMaker Pro files).
Options Use Specify to choose an adjustment option. • Resize to fit resizes the window to the minimum size possible while keeping all items in the layout visible. • Maximize resizes the window to full-screen size. • Minimize reduces the window to an icon on the status bar (Windows) or Dock (Mac OS) • Restore returns the window to its previous size. • Hide hides the current database window from view.
• Height is the height of the adjusted window in pixels. You can enter a number or click Specify to generate a number from a calculation. • Width is the width of the adjusted window in pixels.You can enter a number or click Specify to generate a number from a calculation. • Distance from top is the adjusted window’s distance in pixels from the top of the screen (Mac OS) or top of the FileMaker Pro window (Windows). You can enter a number or click Specify to generate a number from a calculation.
Examples Go to Layout [“List of Members”] Move/Resize Window [Current Window; Height: 400; Width: 600; Top: 16; Left: 16] Related topics Script steps reference (alphabetical list) Contents Arrange All Windows Purpose Adjusts the size and location of all open windows. Format Arrange All Windows [Tile Horizontally/Tile Vertically/Cascade Window/Bring All to Front] Options • Tile Horizontally positions open windows in a left/right orientation. Windows are resized to prevent overlapping.
Examples Perform Find [Restore] Sort Records [Restore] New Window [Name: “Customers”; Height: 200; Width: 600; Top: 16; Left: 16] Arrange All Windows [Tile Vertically] Related topics Script steps reference (alphabetical list) Contents Freeze Window Purpose Stops updating the active window. Format Freeze Window Options None. Compatibility This script step is: • not supported in web publishing • not supported in a FileMaker Server scheduled script Originated in FileMaker Pro 6.
Related topics Script steps reference (alphabetical list) Contents Refresh Window Purpose Updates the entire contents of the FileMaker Pro document window, including any related records. Format Refresh Window Options Select Flush cached join results to delete the results of queries for related records and cause related records to be refreshed.
Scroll Window Purpose Scrolls a window up or down, scrolls to the top or bottom of a layout, or brings the current field into view. Format Scroll Window [Home/End/Page Up/Page Down/To Selection] Options Use Specify to choose a scrolling option. • Home, End, Page Up, or Page Down scrolls the window to the beginning, to the end, up a page, or down a page. • To Selection brings the current field into view (similar to tabbing into a field).
Options • Lock prohibits the user from using the status toolbar control the status toolbar. to manually show or hide • Show tells FileMaker Pro to show the status toolbar. • Hide tells FileMaker Pro to hide the status toolbar. • Toggle switches between showing and hiding the status toolbar (equivalent to clicking Show/Hide Status Toolbar). Compatibility This script step is also supported in web publishing and in a FileMaker Server scheduled script. Originated in FileMaker Pro 6.
Description Choosing the Toggle option switches the current state of the ruler. The Text Ruler is used to format paragraphs and tabs within fields and on layouts. Examples Go to Layout ["Notes"] Toggle Text Ruler [Show] Related topics Script steps reference (alphabetical list) Contents Set Window Title Purpose Changes the title of a window.
Related topics Script steps reference (alphabetical list) Contents Set Zoom Level Purpose Enlarges or reduces the image on the screen. Format Set Zoom Level [Lock; 25%...400%/Zoom In/Zoom Out] Options • Lock prohibits users from making changes to the zoom level. • Specify lets you select a zoom level. • Reduction values: 100%, 75%, 50%, or 25%. • Enlargement values: 150%, 200%, 300%, or 400%. • Zoom In reduces the screen image by one zoom level. • Zoom Out enlarges the screen image by one zoom level.
View As Purpose Displays data in the specified format. Format View As [View as Form/View as List/View as Table/Cycle] Options • View as Form tells FileMaker Pro to display records page by page in the format determined by the database designer. • View as List tells FileMaker Pro to display records as records in a list, so they can be browsed without clicking the left and right arrows in the book.
Files script steps Files script steps operate on entire files. With Files script steps, you can: • create a file • open or close a file • save a copy of a file • convert a file to FileMaker Pro • set multi-user status • allow users to choose formats for the file • recover a file • set print setup options • print New File Purpose Allows the user to create a new database file. Format New File Options None.
Related topics Script steps reference (alphabetical list) Contents Open File Purpose Opens the specified FileMaker file or allows the user to select a file to open. Format Open File [Open hidden; “”] Options • Open hidden causes FileMaker Pro to open and hide the specified database. • Specify lets you select a FileMaker Pro database or ODBC data source to open. Choose Add FileMaker Data Source or Add ODBC Data Source to locate and select a file.
Examples If [DayName(Get(CurrentDate)="Monday"] Open ["Weekly Planner"] Else Open ["Daily Planner"] End If Related topics Convert File Script steps reference (alphabetical list) Contents Close File Purpose Closes the specified FileMaker file. Format Close File [Current File/””] Options Specify lets you select a FileMaker Pro to close or an ODBC data source to disconnect from. Choose Add FileMaker Data Source or Add ODBC Data Source to locate and select a file.
Examples Close Close Close Close ["Names"] ["Payments"] ["Tasks"] [Current File] Related topics Script steps reference (alphabetical list) Contents Convert File Purpose Converts a supported file type into a FileMaker Pro file. Format Convert File [“”] Options • Specify data source lets you choose the file or source of the data to be converted. If you don’t specify a file, FileMaker Pro displays the Open File dialog box when the script step executes.
Compatibility This script step is: • not supported in web publishing • not supported in a FileMaker Server scheduled script Originated in FileMaker Pro 6.0 or earlier Description Note You cannot use this command to convert the contents of a folder. Each file in a folder must be converted separately. Examples Convert File [“mydata.fp5”] Related topics Script steps reference (alphabetical list) Contents Set Multi-User Purpose Allows or disallows network access to a database.
Originated in FileMaker Pro 6.0 or earlier Description A shared, or multi-user, database is a file available to users on a network. Examples This script could be a startup script to guarantee that a database is hosted upon launch. Show Custom Dialog ["Make this file available on the network?"] If [Get (LastMessageChoice) = 1] Set Multi-User [On] End If Tip The Get(MultiUserState) function could be used to verify the resulting multi-user setting.
Description Each FileMaker Pro database file stores the date, time, and number formatting of the computer on which the database was created. These regional settings may be different from the system formats currently set on your computer. When you use the current system formats, you don't change the formats saved with the file – you simply enter and view data in a format that's familiar to you.
Originated in FileMaker Pro 6.0 or earlier Description Use this script step to back up your database. Note This script step is not supported in FileMaker Pro database files hosted by FileMaker Server. Examples Save a Copy as ["backup"] Related topics Script steps reference (alphabetical list) Contents Recover File Purpose Recovers a damaged FileMaker Pro file.
Note Before you begin, be sure you have enough disk space for the recovered file. If there isn't enough space, the recovered file won't be usable. Examples #Note: The Recover command makes an aggressive attempt to reopen a damaged file. It is intended for data recovery, not file repair. Do not use the Recover command as part of routine file maintenance.
Print Setup [Restore; No dialog] Show All Records Sort Records [Restore; No dialog] Print [] Related topics Script steps reference (alphabetical list) Contents Print Purpose Prints information in a file. Format Print [Restore; No dialog] Options • Select Perform without dialog to prevent the Print dialog box from displaying when the script step executes. • Select Specify print options or click Specify to specify an output destination.
Notes • When you use more than one Print script step in a script, the saved printer name applies to only the containing Print script step. • A printer name specified in a Print Setup script step is not inherited by any Print script step in a script. • Mac OS: If a FileMaker Pro 9 (or earlier) file contains a script with Print Script [restore; no dialog], the output goes to the default OS printer when you run the script in a later version of FileMaker Pro (for example, FileMaker Pro 10 or 11).
Add Account Purpose Adds a new account name, password, and privilege set. Format Add Account [Account Name: ; Password: ; Privilege Set: “”; Expire password] Options Click Specify to display the “Add Account” Options dialog box, where you can set the following options. • Account Name is the name for the new account. You can enter literal text or click Specify to create a new account name from a calculation. • Password is the password for the new account.
Related topics Script steps reference (alphabetical list) Contents Delete Account Purpose Deletes the specified account. Format Delete Account [Account Name: ] Options Click Specify to set the Account Name to be deleted. You can enter literal text or click Specify to create an account name from a calculation. Compatibility This script step is also supported in web publishing and in a FileMaker Server scheduled script. Originated in FileMaker Pro 6.
Reset Account Password Purpose Resets the password of the existing FileMaker Pro account you specify. Format Reset Account Password [Account Name: ; New Password: ; Expire password] Options • Click Specify to display the “Reset Account Password” Options dialog box, where you can set the following options. • Account Name is the name of the existing FileMaker Pro account with the password to be reset.
Change Password Purpose Changes the password for the current account. Format Change Password [Old Password: ; New Password: ; No dialog] Options Click Specify to display the “Change Password” Options dialog box, where you can set the following options. • Old Password is the old password for the current account. You can enter literal text or click Specify to generate the password from a calculation. • New Password is the new password for the current account.
Examples The following, used as a startup script with a password-protected database, presents the user with the Change Password dialog box every other time the database is opened (to encourage the user to change his or her password frequently). The gOpenCount field is a global number field that records how many times the database has been opened.
Examples Enable Account [Account Name:"MyAccount"; Activate] Related topics Script steps reference (alphabetical list) Contents Re-Login Purpose Allows the user to log in to the database using a different account and password without closing and reopening the file. Format Re-Login [Account Name: ; Password: ; No dialog] Options Perform without dialog prevents the Open dialog box from displaying when the script step executes.
• If the Set Error Capture script step is enabled, users get a single attempt to enter their account and password.
Examples Check Selection [Select; Table1::Balance Due Letter] Related topics Script steps reference (alphabetical list) Contents Check Record Purpose Uses the spelling checker to check the contents of every field in the current record. Format Check Record Options None. Compatibility This script step is: • not supported in web publishing • not supported in a FileMaker Server scheduled script Originated in FileMaker Pro 6.
Format Check Found Set Options None. Compatibility This script step is: • not supported in web publishing • not supported in a FileMaker Server scheduled script Originated in FileMaker Pro 6.0 or earlier Examples Perform Find [Restore] Check Found Set Related topics Script steps reference (alphabetical list) Contents Correct Word Purpose Opens the Spelling dialog box so you can correct a word that FileMaker Pro has identified as misspelled. Format Correct Word Options None.
Description This script step is the same as choosing Edit menu > Spelling > Correct Word. Use this script step to open the Spelling dialog box for users if you have restricted their access to FileMaker Pro menus. Notes • Check spelling as you type must be selected (File menu > File Options > Spelling tab.) • This script step can only correct a word after FileMaker Pro identifies it as being misspelled.
Description This script step is the same as choosing File menu > File Options > Spelling tab. Use this script step to open the File Options dialog box for users if you have restricted their access to FileMaker Pro menus. Examples The following script displays a message box that asks if the user wants to turn on the Check spelling as you type option, and opens the File Options dialog box if the response is Yes.
Examples Select Dictionaries Related topics Script steps reference (alphabetical list) Contents Edit User Dictionary Purpose Opens the User Dictionary dialog box. Format Edit User Dictionary Options None. Compatibility This script step is: • not supported in web publishing • not supported in a FileMaker Server scheduled script Originated in FileMaker Pro 6.0 or earlier Description This script step is the same as choosing Edit menu > Spelling > Edit User Dictionary.
Open Menu Item script steps Open Menu Item script steps open specific FileMaker Pro dialog boxes as if you had chosen the command from a menu. You could use one of these script steps to open a dialog box for users if you have restricted their access to FileMaker Pro menus with access privileges.
Examples The following script displays a message box that asks if the user wants to open the Edit Saved Finds dialog box, and opens it if the response is Yes. Show Custom Dialog ["Do you want to change a saved find?"] If [Get (LastMessageChoice) = 1] #1=Yes, 2=No Open Edit Saved Finds End If Related topics Script steps reference (alphabetical list) Contents Open Preferences Purpose Opens the Preferences dialog box to the General preferences area. Format Open Preferences Options None.
Open Preferences End If Related topics Script steps reference (alphabetical list) Contents Open File Options Purpose Opens the File Options dialog box to the General preferences area. Format Open File Options Options None. Compatibility This script step is: • not supported in web publishing • not supported in a FileMaker Server scheduled script • not supported in runtime solutions except for spell checking (the Spelling tab opens) Originated in FileMaker Pro 6.
Open Manage Database Purpose Opens the Manage Database dialog box, where the user can create or edit tables, fields, and relationships. Format Open Manage Database Options None. Compatibility This script step is: • not supported in web publishing • not supported in a FileMaker Server scheduled script • not supported in runtime solutions Originated in FileMaker Pro 6.0 or earlier Description This script step is the same as choosing File menu > Manage > Database.
Open Manage Data Sources Purpose Opens the Manage External Data Sources dialog box, where the user can create, edit, or delete external FileMaker or ODBC data sources. Format Open Manage Data Sources Options None. Compatibility This script step is: • not supported in web publishing • not supported in a FileMaker Server scheduled script • not supported in runtime solutions Originated in FileMaker Pro 6.
Open Manage Layouts Purpose Displays the Manage Layouts dialog box. Format Open Manage Layouts Options None. Compatibility This script step is: • not supported in web publishing • not supported in a FileMaker Server scheduled script • not supported in runtime solutions Originated in FileMaker Pro 11.0 Description This script step is the same as choosing File menu > Manage > Layouts, or choosing Manage Layouts from the Layout pop-up menu.
Format Open Manage Scripts Options None. Compatibility This script step is: • not supported in web publishing • not supported in a FileMaker Server scheduled script • not supported in runtime solutions Originated in FileMaker Pro 6.0 or earlier Description This script step is the same as choosing Scripts menu > Manage Scripts, or File menu > Manage > Scripts. Note Once an Open Manage Scripts step is performed, FileMaker Pro halts execution of the current script.
Options None. Compatibility This script step is: • not supported in web publishing • not supported in a FileMaker Server scheduled script • not supported in runtime solutions Originated in FileMaker Pro 6.0 or earlier Description This script step is the same as choosing File menu > Manage > Value Lists. Use this script step to open the Manage Value Lists dialog box for users if you have restricted their access to FileMaker Pro menus.
Compatibility This script step is: • not supported in web publishing • not supported in a FileMaker Server scheduled script Originated in FileMaker Pro 7.0 Description This script step is the same as choosing Edit menu > Find/Replace > Find/Replace. Use this script step to open the dialog box for users if you have restricted their access to FileMaker Pro menus.
Originated in FileMaker Pro 6.0 or earlier Description This script step is the same as choosing Help menu > FileMaker Pro Help. Examples The following script displays a message box that asks if the user wants to see the onscreen Help, and opens it if the response is Yes.
Examples The following script displays a message box that asks if the user wants to open a shared database, and opens the Open Remote dialog box if the response is Yes. Show Custom Dialog ["Do you want to open a shared database?"] If [Get (LastMessageChoice) = 1] #1=Yes, 2=No Open Remote End If Related topics Script steps reference (alphabetical list) Contents Open Sharing Purpose Opens the FileMaker Network Settings dialog box, where users can set up network database sharing.
Examples The following script displays a message box that asks if the user wants to share the current database, and opens the FileMaker Network Settings dialog box if the response is Yes.
• Button Labels let you specify how many buttons (up to three) to display in the custom dialog box and labels for these buttons. If you leave a button label blank, the button does not appear in the custom dialog box. If you leave all button titles blank, an OK button displays in the lower-right corner of the custom dialog box. Input Field options • Select Show input field to activate an input field. • Select Specify to choose the field for input. Each input area maps to one field.
• Data entry via the Show Custom Dialog script step is limited by any access privileges criteria that may be in place. (Select Run script with full access privileges to enable the script for all users.) • (Windows) You can create a keyboard shortcut for a custom dialog box button by placing an ampersand before the shortcut key letter in the button label. For example, to create a keyboard shortcut ‘D’ (Alt+D) for a button labeled ‘Done’, type the label ‘&Done’.
Allow Toolbars Purpose Enables or disables display of the formatting bar. Format Allow Toolbars [] Options • On indicates that the formatting bar, the View menu > Formatting Bar menu item, and the Formatting Bar button in the layout bar are enabled. • Off hides the formatting bar, disables the View menu > Formatting Bar menu item, and disables the Formatting Bar button in the layout bar.
Options None. Compatibility This script step is: • not supported in web publishing • not supported in a FileMaker Server scheduled script Originated in FileMaker Pro 6.0 or earlier Examples Set Error Capture [On] Perform Find [Restore] If [Get (LastError) <> 0] Beep Show Custom Dialog ["Couldn't find the record..."] End If Related topics Script steps reference (alphabetical list) Contents Speak (Mac OS) Purpose Produces speech from text.
Originated in FileMaker Pro 6.0 or earlier Description You can enter a literal text string or use a calculation to create the text to be spoken. You can also specify which voice synthesizer to use and whether or not to wait for the speech to be completed, before continuing with the next script step. If the database is opened on a non-speaking computer, the script can still be edited, but only the default voice synthesizer is available.
• Click Specify to display the “Dial Phone” Options dialog box where you can set the following options. • Phone Number lets you enter a phone number to dial. • Specify lets you create a calculation to generate the phone number. • Use Dialing Preferences (if NDISWAN TAPI is not installed) tells FileMaker Pro to use the current phone dialing preferences, based on your location. These preferences remove, insert, and append digits to phone numbers, as when a dialing prefix is required in a business setting.
Install Menu Set Purpose Changes the menu set based on conditions established in the script. Format Install Menu Set [specified menu set name] Options Use As File Default overrides the file’s default menu set specified in the Manage Custom Menus dialog box with the menu set specified in this script step. Once you close the file, the default menu set reverts to the one specified in the Manage Custom Menus dialog box. Select the menu set that you want the script step to install from the list.
Options Click Specify to display the Set Web Viewer Options dialog box, where you can set the following options: • Object Name is the name of the web viewer to act upon. To assign an object name, select the web viewer, choose View menu > Inspector in Layout mode. Click Position, then enter a name for the object. • For Action, choose one of the following: • Reset resets the named web viewer to its originally specified web address. This action also clears this web viewer’s Back and Forward history.
• You can send html data to a web viewer by including the data in a URL, using the following format: data:[][;base64], Where the following syntax applies: dataurl = "data:" [ mediatype ] [ ";base64" ] "," data mediatype = [ type "/" subtype ] *( ";" parameter ) data = *urlchar parameter = attribute "=" value More information about the “data URL scheme” can be found on the web. • In FileMaker Pro 8.5, data URLs will work on Mac OS_X but not in Windows.
Options • Perform without dialog prevents the “Open URL” Options dialog box from displaying when the script step executes. • Click Specify to display the “Open URL” Options dialog box, where you can type the URL directly in the text entry area or click Specify to create your URL from a calculation. Compatibility This script step is supported in web publishing but not in a FileMaker Server scheduled script. Originated in FileMaker Pro 6.
Related topics Script steps reference (alphabetical list) Contents Send Mail Purpose Sends an intranet or internet email message (with or without a file attachment) to one or more recipients. Email can be sent through an email application or via SMTP (Simple Mail Transfer Protocol, a set of criteria for sending and receiving email).
• Subject indicates the title for the email message. • Message indicates the text of the email message. You can type the message as text, use a field value, create a message from a calculation, or insert text from a file. • Select Attach File to select a file to send as an attachment to the mail message.
Related topics Script steps reference (alphabetical list) Contents Send DDE Execute (Windows) Purpose Sends a DDE (Dynamic Data Exchange) command to another application to execute a series of commands available in that application. Format Send DDE Execute [; ] Options Click Specify to display the “Send DDE Execute” Options dialog box, where you can set the following options: • Service name is the name of the application that executes the commands.
• When a FileMaker Pro script first establishes a DDE connection, the connection stays open to execute subsequent script steps for the same service name and topic. If the script includes another DDE Execute script step using a different service name or topic, FileMaker Pro closes the current connection and opens another with the new service name and topic. All open connections close when the script is completed. Examples The following script opens a URL in Internet Explorer.
Description You can create a calculation to generate the AppleScript commands to be sent, or you can type the commands directly into the Native AppleScript text area. For calculated scripts and scripts stored in FileMaker Pro fields, the AppleScript commands are compiled each time the script is performed. If you type the script into the Native AppleScript text area, then FileMaker Pro compiles the script and detects any scripting or system errors. (The script is recompiled whenever it's edited.
Options • Perform without dialog prevents the Specify SQL dialog box, the Select ODBC Data Source dialog box, and the Password dialog box from displaying when the script step executes. • Click Specify to display the Specify SQL dialog box, where you can set the following options. • Specify displays the Select ODBC Data Source dialog box. Select a data source from the list, click OK, and enter a valid user name and password.
Examples The following example of a manual SQL statement entry executes once each time you run the Execute SQL script step.
• do script tells FileMaker Pro to perform a script in the language of the target application. Click Specify Application to select an application, and use Document to select the document to use with the target application. Or, select Script text and enter script text or type in the name of the script (make sure it is one that will be recognized by the target program). • other displays the Specify event dialog box, where you can manually enter the Apple event Event class and Event ID.
Related topics Script steps reference (alphabetical list) Contents Send Event (Windows) Purpose Starts another application, opens a document in another application, or prints a document in another application. Format Send Event [“”; “”; “”] Options Click Specify to display the “Send Event” Options dialog box, where you can set the following options.
Examples To launch the Notepad application, select the open document/application message, click File, and specify notepad.exe. The following script step appears in the Script Definition dialog box: Send Event ["aevt"; "odoc"; "NOTEPAD.EXE"] To open a document created by another application, select the open document/application message, click File, and specify the file (for example image.bmp). The following script step appears in the Script Definition dialog box: Send Event ["aevt"; "odoc"; "image.
Examples Set Error Capture [On] Perform Find [Restore] If [Get (LastError) = 401] #If the current error is 401, nothing was found Show Custom Dialog ["No records were found."] If [Get (LastMessageChoice) = 1] Modify Last Find Else Enter Browse Mode [] End If End If Related topics Script steps reference (alphabetical list) Contents Flush Cache to Disk Purpose Performs an immediate flush of the FileMaker Pro internal disk cache to the computer's hard disk. Format Flush Cache to Disk Options None.
Examples Perform Find [ ] Sort Records [Restore] Go to Record/Request/Page [First] Replace Field Contents [script examples::Serial Number; Serial numbers] Flush Cache to Disk Related topics Script steps reference (alphabetical list) Contents Exit Application Purpose Closes all open files and exits the FileMaker Pro application. Format Exit Application Options None. Compatibility This script step is also supported in web publishing and in a FileMaker Server scheduled script.