Get functions

Get functions monitor errors in scripts, or capture information about file status or actions 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 update only when a new record is created. If the calculation has other fields in it but the calculation result still returns the current time, the stored calculation result will update only 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.

This function Returns

Get(AccountExtendedPrivileges)

Returns a list of keywords, based on the account used to open the file, for the enabled extended privileges.

Get(AccountGroupName)

Returns the current account's group name.

Get(AccountName)

Returns the authenticated account name being used by the file's current user.

Get(AccountPrivilegeSetName)

Returns the privilege set name being used by the account used to open the file.

Get(AccountType)

Returns the current account's authentication type.

Get(ActiveFieldContents)

Returns the contents of the field that has the focus.

Get(ActiveFieldName)

Returns the name of the field that has the focus.

Get(ActiveFieldTableName)

Returns the name of the table occurrence that contains the field that has the focus.

Get(ActiveLayoutObjectName)

Returns the name of the layout object that has the focus in the calculation's current window.

Get(ActiveModifierKeys)

Returns a number for the keyboard modifier keys being pressed.

Get(ActivePortalRowNumber)

Returns a number representing the portal row that has the focus.

Get(ActiveRecordNumber)

Returns a number representing the record that has focus in the current found set.

Get(ActiveRepetitionNumber)

Returns a number representing the repetition that has the focus in a repeating field.

Get(ActiveSelectionSize)

Returns a number representing how many characters are selected.

Get(ActiveSelectionStart)

Returns a number representing the starting character of the selected text.

Get(AllowAbortState)

Returns 1 (true) if the Allow User Abort script step is on; otherwise, returns 0 (false).

Get(AllowFormattingBarState)

Returns 1 (true) if the formatting bar is allowed to be visible; otherwise, returns 0 (false).

Get(ApplicationArchitecture)

Returns the current application architecture.

Get(ApplicationLanguage)

Returns text representing the current application language.

Get(ApplicationVersion)

Returns the FileMaker client's product name and version.

Get(CacheFileName)

Returns the name of the cache file for the currently active file.

Get(CacheFilePath)

Returns the path of the cache file for the currently active file.

Get(CalculationRepetitionNumber)

Returns a number representing the repetition of the calculation field being calculated.

Get(ConnectionAttributes)

Returns the name of the current file's host, and the certificate authority that issued the SSL certificate used to secure the connection.

Get(ConnectionState)

Returns a number representing the security state of the network connection for the current file.

Get(CurrentDate)

Returns the current date according to the system calendar.

Get(CurrentExtendedPrivileges)

Returns a list of keywords, based on the account used to evaluate this calculation, for the enabled extended privileges.

Get(CurrentHostTimestamp)

Returns the host's current date and time (to the nearest second) according to the system clock.

Get(CurrentPrivilegeSetName)

Returns the name of the privilege set being used to evaluate this calculation in the file.

Get(CurrentTime)

Returns the current time (to the nearest second) according to the system clock.

Get(CurrentTimestamp)

Returns the current date and time (to the nearest second) according to the system clock.

Get(CurrentTimeUTCMicroseconds)

Returns the current time in Coordinated Universal Time (UTC) to the nearest microsecond.

Get(CurrentTimeUTCMilliseconds)

Returns the current time in Coordinated Universal Time (UTC) to the nearest millisecond.

Get(CustomMenuSetName)

Returns the name of the active custom menu set.

Get(DesktopPath)

Returns the path to the desktop folder for the current user.

Get(Device)

Returns a number representing the type of computer or mobile device running the FileMaker product.

Get(DocumentsPath)

Returns the path to the Documents folder for the current user.

Get(DocumentsPathListing)

Returns a list of all files and folders in the Documents folder returned by the Get(DocumentsPath) function.

Get(EncryptionState)

Returns a value representing the file's current encryption state.

Get(ErrorCaptureState)

Returns 1 (true) if the Set Error Capture script step is on; otherwise, returns 0 (false).

Get(FileLocaleElements) Returns a JSON object with information about the current file's locale.

Get(FileMakerPath)

Returns the path to the folder of the currently running copy of a FileMaker product.

Get(FileName)

Returns the name of the currently active file, without the filename extension.

Get(FilePath)

Returns the full path of the location of the currently active file.

Get(FileSize)

Returns the size, in bytes, of the currently active file.

Get(FoundCount)

Returns the number of records in the current found set.

Get(HighContrastState)

Returns 1 (true) if high contrast is available and active; otherwise, returns 0 (false).

Get(HostApplicationVersion)

Returns the FileMaker host's product name and version.

Get(HostIPAddress)

Returns the IP address of the host computer for the current file.

Get(HostName)

Returns the name of the current host.

Get(InstalledFMPlugins)

Returns the name, version number, and enabled state of installed plug-ins.

Get(InstalledFMPluginsAsJSON) Returns a JSON object with the attributes of installed plug-ins.

Get(LastError)

Returns a number for the error that occurred in the execution of the most recently executed script step.

Get(LastErrorDetail)

Returns text about errors that are returned by Get(LastError).

Get(LastErrorLocation)

Returns the script name, step name, and line number of errors that are returned by Get(LastError).

Get(LastMessageChoice)

Returns a number corresponding to the button clicked in an alert message displayed by the Show Custom Dialog script step.

Get(LastStepTokensUsed)

Returns the tokens used in the last AI script step.

Get(LayoutAccess)

Returns a number based on record access privileges available through the current layout.

Get(LayoutCount)

Returns the total number of layouts in the file.

Get(LayoutName)

Returns the name of the layout currently being displayed.

Get(LayoutNumber)

Returns the number of the layout (specified in the Manage Layouts dialog box) currently displayed.

Get(LayoutTableName)

Returns the name of the table occurrence displaying records in the current layout.

Get(LayoutViewState)

Returns a number representing the currently active file view.

Get(MenubarState)

Returns a number representing the current menu bar state.

Get(ModifiedFields)

Returns a list of fields that have been modified in the current record of the current table.

Get(MultiUserState)

Returns a number representing the level of sharing for the file using FileMaker Network.

Get(NetworkProtocol)

Returns the name of the network protocol (TCP/IP or HTTPS).

Get(NetworkType)

In FileMaker Go, returns a number representing the type of network being used to access the current file.

Get(OpenDataFileInfo)

Returns the file ID and path of each open data file.

Get(PageCount)

Returns a number representing the total page count in the current print job while it's printing.

Get(PageNumber)

Returns a number representing the current page being printed or previewed.

Get(PersistentID)

Returns text representing a unique identifier of the computer or device running a FileMaker client.

Get(PreferencesPath)

Returns the path to the preferences and default options folder for the current user.

Get(PrinterName)

Returns text identifying the default printer name.

Get(QuickFindText)

Returns the text that is stored in the quick find box.

Get(RecordAccess)

Returns a number representing the current record's access privileges, assigned through the Custom Record Privileges dialog box.

Get(RecordID)

Returns the unique ID number of the current record.

Get(RecordModificationCount)

Returns the total number of times changes to the current record have been committed.

Get(RecordNumber)

Returns a number representing a record's position in the current found set.

Get(RecordOpenCount)

Returns the total number of open records in the current found set that haven't been saved.

Get(RecordOpenState)

Returns a number representing the state of the current record.

Get(RegionMonitorEvents)

Returns events that caused the script specified in the Configure Region Monitor Script script step to run.

Get(RequestCount)

Returns the total number of find requests defined for the current table.

Get(RequestOmitState)

Returns 1 (true) if Omit is selected in the current find request; otherwise, returns 0 (false).

Get(ScreenDepth)

Returns the number of bits needed to represent the color or shade of gray of a pixel on the main screen.

Get(ScreenHeight)

Returns the height, in points, of the screen in which the window of the current file is open.

Get(ScreenScaleFactor)

Returns the scale factor of the screen in which the current file is open.

Get(ScreenWidth)

Returns the width, in points, of the screen in which the window of the current file is open.

Get(ScriptAnimationState)

Returns 1 (true) if animations are enabled for the current script; otherwise, returns 0 (false).

Get(ScriptName)

Returns the name of the script that is currently running or is paused.

Get(ScriptParameter)

Returns the script parameter passed into the current script.

Get(ScriptResult)

Returns the script result from a performed sub-script.

Get(SessionIdentifier)

Returns the value set by the Set Session Identifier script step.

Get(SortState)

Returns a value representing the current sort state.

Get(StatusAreaState)

Returns a number representing the current status toolbar state.

Get(SystemAppearance)

Returns the name of the current operating system appearance.

Get(SystemDrive)

Returns the drive letter (Windows) or volume name (macOS) where the running operating system is located.

Get(SystemIPAddress)

Returns a list of the IP addresses of all computers connected to an active NIC (Network Interface Controller) card.

Get(SystemLanguage)

Returns the language currently set on the current system.

Get(SystemLocaleElements) Returns a JSON object with information about the client system's locale.

Get(SystemNICAddress)

Returns the hardware addresses of all NIC (Network Interface Controller) cards connected to the computer.

Get(SystemPlatform)

Returns a number representing the current platform.

Get(SystemVersion)

Returns the version of the current operating system.

Get(TemporaryPath)

Returns the path to the current FileMaker temporary folder.

Get(TextRulerVisible)

Returns 1 (true) if the text ruler is displayed; otherwise, returns 0 (false).

Get(TotalRecordCount)

Returns the total number of records in the current table.

Get(TouchKeyboardState)

Returns 1 (true) if the touch keyboard is set to display automatically when needed; otherwise, returns 0 (false).

Get(TransactionOpenState)

Returns 1 (true) if the transaction is opened; otherwise, returns 0 (false).

Get(TriggerCurrentPanel)

Returns the index and object name of the panel to switch from when the OnPanelSwitch script trigger is activated.

Get(TriggerExternalEvent)

In FileMaker Go, returns a number representing the event that activated an OnExternalCommandReceived script trigger.

Get(TriggerGestureInfo)

Returns details about the gesture that activated an OnGestureTap script trigger.

Get(TriggerKeystroke)

Returns the characters that activated an OnObjectKeystroke or OnLayoutKeystroke script trigger.

Get(TriggerModifierKeys)

Returns the state of the keyboard modifier keys when an OnObjectKeystroke or OnLayoutKeystroke script trigger was activated.

Get(TriggerTargetPanel)

Returns the index and the object name of the panel to switch to when the OnPanelSwitch script trigger is activated.

Get(UserCount)

Returns the number of clients currently accessing the file.

Get(UserName)

Returns the name of the FileMaker user, as specified in the General tab of the Preferences dialog box.

Get(UseSystemFormatsState)

Returns 1 (true) if Use System Formats in the Format menu is on; otherwise, returns 0 (false).

Get(UUID)

Returns text representing a Universally Unique Identifier (UUID).

Get(UUIDNumber)

Returns a number representing a large Universally Unique Identifier (UUID) value.

Get(WindowContentHeight)

Returns the height, in points, of the window content area.

Get(WindowContentWidth)

Returns the width, in points, of the window content area.

Get(WindowDesktopHeight)

Returns the height, in points, of the desktop space.

Get(WindowDesktopWidth)

Returns the width, in points, of the desktop space.

Get(WindowHeight)

Returns the height, in points, of the window on which the script is acting.

Get(WindowLeft)

Returns the horizontal distance, in points, of the outer edge of the window on which the script is acting, relative to the leftmost edge of the screen.

Get(WindowMode)

Returns a number representing the mode the FileMaker product is in when the function is evaluated.

Get(WindowName)

Returns the name of the window on which the script is acting.

Get(WindowOrientation)

Returns a value representing the orientation of the window on which the script is acting.

Get(WindowStyle)

Returns the style of the window on which the script is acting.

Get(WindowTop)

Returns the vertical distance, in points, of the outer edge of the window on which the script is acting, relative to the top edge of the screen in Windows, or the bottom edge of the menu bar in macOS.

Get(WindowVisible)

Returns 1 (true) if the window is visible; returns 0 (false) if the window is hidden using Hide Window.

Get(WindowWidth)

Returns the width, in points, of the window on which the script is acting.

Get(WindowZoomLevel)

Returns the zoom percentage of the current window.

Example 1 

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.

Copy
Go to Layout ["LayoutName"]
Go to Record/Request/Page [First]
Loop [ Flush: Always ]
  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 [Send via E-mail Client; With dialog: Off; To: DatabaseName::Client; Subject: "Late Notice"; Message: "Your account is past due."]
    End If
  End If
  Go to Record/Request/Page [Next; Exit after last: On]
End Loop
Go to Layout [original layout]