Get functions
Use Get functions in scripts for error checking and prevention, or to capture information about the status of a database file or elements in it, or an action being performed.
Many Get functions return information that changes on a regular basis. For example, when the Get(CurrentTime) function is placed in a stored calculation field, the time will only update when a new record is created. If the calculation has other fields in it, but the calculation result still returns the current time, then the stored calculation result will only update when those other fields have been modified in the current record. If either of these calculations are unstored, the time will update as needed. For performance reasons, making a calculation field unstored is not always the best idea. Get functions are best used in a script where the status information from a Get function is up to date at the moment that the calculation is run.
To access the list of Get functions, in the Specify Calculation dialog box, choose View all functions by type or View Get functions. When you choose View all functions by name, you see only Get(flag).
Note  For information on how functions evaluate differently on the host versus the client, search the FileMaker Knowledge Base available at www.filemaker.com/kb.
Click a function name for details.
 
The contents of the field that has the focus.
The name of the field that has the focus.
The name of the table that contains the active field (the field that has the focus).
A number representing the active repetition of a repeating field (the repetition that has the focus).
A Boolean value representing the current state of Allow user abort script step.
Text representing the FileMaker Pro application version.
The path to the Documents folder for the current user.
A list of keywords for the enabled extended privileges, separated by carriage returns
The name of the current high contrast default color scheme if Use High Contrast is selected in the Windows operating system Accessibility Options dialog box.
A Boolean value representing the state of the Use High Contrast checkbox on the Accessibility Options dialog box.
The version of FileMaker Pro or FileMaker Server running on the computer that is hosting the current database.
A number corresponding to the button clicked in an alert message displayed by the Show Custom Dialog script step.
A string that shows the error state published by ODBC standards, based on ISO/IEF standards.
A number corresponding to the layout access privileges assigned through the Manage Accounts & Privileges dialog box.
The total number of layouts in the database file.
The name of the network protocol that FileMaker Pro is using on this machine.
The number of the portal row containing the focus.
The name of the privilege set being used by the current user.
The number of pixels displayed horizontally on the screen in which the window of the current file is open.
A number value representing the current sort state.
A number representing whether the status toolbar is hidden, visible, visible and locked, or hidden and locked.
The drive letter (Windows) or the volume name (Mac OS) where the currently running operating system is located.
The IP addresses of all the machines connected to a NIC (Network Interface Controller) card.
The name of the FileMaker Pro user, as specified in the General tab of the Preferences dialog box.
A Boolean value representing the state of the Use System Formats menu command.
A number representing the height, in pixels, of the current window of the file in which the calculation is defined.
A number representing the horizontal distance, in pixels, of the outer edge of the current window relative to the left-most edge of the screen.
A number representing whether FileMaker Pro is in Browse mode, Find mode, Preview mode, or printing when the function is evaluated.
A number representing the vertical distance, in pixels, of the outer edge of the current window relative to the bottom edge of the menu bar.
A number representing the width, in pixels, of the current window of the file in which the calculation is defined.
Get functions example
This script uses the function Get(CurrentDate) to check each record in the found set to see if an account is past due. If an account is past due, the script shows a message and prompts the user to click a button labeled Ignore, Send Letter, or Send Mail (set up through the Show Custom Dialog script step). The script captures the user's response using Get(LastMessageChoice). Then, based on the user's response, the script performs an action: it cancels the rest of the script, prints a "payment is late" letter, or sends email to the associated account.
 
Go to Layout ["LayoutName"]
Go to Record/Request/Page [First]
Loop
  If [DatabaseName::Date < Get(CurrentDate) - 30]
    Show Custom Dialog ["30 or more days late"]
    If [Get(LastMessageChoice) = 1]
      Halt Script
    Else If [Get(LastMessageChoice) = 2]
      Go to Layout ["Late Notice"]
      Print []
    Else
      Send Mail [To: DatabaseName::Client; Subject: "Late Notice"; Message: "Your account is past due."]
    End If
  End If
  Go to Record/Request/Page [Exit after last, Next]
End Loop
Go to Layout [original layout]
Topics in this section
Get(AccountName)
Get(ActiveFieldContents)
Get(ActiveFieldName)
Get(ActiveFieldTableName)
Get(ActiveLayoutObjectName)
Get(ActiveModifierKeys)
Get(ActiveRepetitionNumber)
Get(ActiveSelectionSize)
Get(ActiveSelectionStart)
Get(AllowAbortState)
Get(AllowToolbarState)
Get(ApplicationLanguage)
Get(ApplicationVersion)
Get(CalculationRepetitionNumber)
Get(CurrentDate)
Get(CurrentHostTimestamp)
Get(CurrentTime)
Get(CurrentTimestamp)
Get(CustomMenuSetName)
Get(DesktopPath)
Get(DocumentsPath)
Get(DocumentsPathListing)
Get(ErrorCaptureState)
Get(ExtendedPrivileges)
Get(FileMakerPath)
Get(FileName)
Get(FilePath)
Get(FileSize)
Get(FoundCount)
Get(HighContrastColor)
Get(HighContrastState)
Get(HostApplicationVersion)
Get(HostIPAddress)
Get(HostName)
Get(LastError)
Get(LastMessageChoice)
Get(LastODBCError)
Get(LayoutAccess)
Get(LayoutCount)
Get(LayoutName)
Get(LayoutNumber)
Get(LayoutTableName)
Get(LayoutViewState)
Get(MultiUserState)
Get(NetworkProtocol)
Get(PageNumber)
Get(PortalRowNumber)
Get(PreferencesPath)
Get(PrinterName)
Get(PrivilegeSetName)
Get(RecordAccess)
Get(RecordID)
Get(RecordModificationCount)
Get(RecordNumber)
Get(RecordOpenCount)
Get(RecordOpenState)
Get(RequestCount)
Get(RequestOmitState)
Get(ScreenDepth)
Get(ScreenHeight)
Get(ScreenWidth)
Get(ScriptName)
Get(ScriptParameter)
Get(ScriptResult)
Get(SortState)
Get(StatusAreaState)
Get(SystemDrive)
Get(SystemIPAddress)
Get(SystemLanguage)
Get(SystemNICAddress)
Get(SystemPlatform)
Get(SystemVersion)
Get(TemporaryPath)
Get(TextRulerVisible)
Get(TotalRecordCount)
Get(TriggerKeystroke)
Get(TriggerModifierKeys)
Get(UserCount)
Get(UserName)
Get(UseSystemFormatsState)
Get(WindowContentHeight)
Get(WindowContentWidth)
Get(WindowDesktopHeight)
Get(WindowDesktopWidth)
Get(WindowHeight)
Get(WindowLeft)
Get(WindowMode)
Get(WindowName)
Get(WindowTop)
Get(WindowVisible)
Get(WindowWidth)
Get(WindowZoomLevel)