Migrating from FileMaker

FileMaker

File Maker

FileMaker is a database tool that runs on both Windows and macOS. It is often called the Mac version of Access. Much like with Access, FileMaker has its own database engine, form designer and scripting language.

Migrating

Migrating a FileMaker application is typically a three-step process where you migrate the database itself, the forms that are used to manipulate the data and the scripting code.

Database

When migrating a FileMaker application, you first need to consider the database. Although you can connect to a FileMaker database using ODBC, you will need to get the appropriate drivers. As an alternative, you can migrate your data to SQLite (a fast, cross-platform database) by first converting the FileMaker data to XML. You can also connect to a FileMaker database by using Custom Web Publishing and an API.

Forms

Your FileMaker forms are likely used to edit data in tables. You can recreate these forms as Windows (or Web Pages or iOS Views) in your Xojo application. In most cases you will use Label, TextField and TextArea to recreate form fields, but there are lots of other available controls as well. Either way, you would likely have your application connect to the database at startup and then populate the form with the first record. Next and Previous buttons can be added to fetch and display the appropriate information from the database.

Scripting code

FileMaker is programmed using a scripting language that is somewhat similar to the Xojo programming language. You will have to rewrite your code, but at the same time will find the Xojo programming language to be familiar. Here are some FileMaker commands and their Xojo equivalents:

FileMaker Command

Xojo Command

Exit Script

Return

Set Error Capture

Try...Catch

Set Variable

Var

If..End If

If...Then...Else

Loop..End Loop

Do...Loop

Go to Field

TextField.SetFocus

Field assignment

TextField.Text = value

FileMaker library (Xojo.FM)

To make it easier for developers to transition from FileMaker to Xojo, there is an open-source library on GitHub that implements many of the FileMaker functions so that you can use them by name in Xojo.

To use the library, download the library from GitHib and open the project. In the Navigator, select the FM module and copy it. Then switch to your project and paste the module to it.

Xojo.FM on GitHub

You can refer to any of the functions in the module by using the FM prefix.

FileMaker commands to Xojo commands

This section highlights FileMaker functions that have an equivalent command or function built-in to Xojo. If there is no built-in equivalent, the corresponding function in Xojo.FM is noted.

Aggregate functions

FileMaker

Xojo

Xojo.FM

Average

n/a

FM.Average

Min

n/a

FM.Min

Max

n/a

FM.Max

Sum

n/a

FM.Sum

Container functions

FileMaker

Xojo

Xojo.FM

Base64Decode

DecodeBase64

FM. Base64Decode

Base64Encode

EncodeBase64

FM. Base64Encode

Date functions

FileMaker

Xojo

Xojo.FM

Date

DateTime

FM.Date

Day

DateTime.Day

FM.Day

DayName

n/a

FM.DayName

DayOfWeek

DateTime.DayOfWeek

FM.DayOfWeek

DayOfYear

DateTime.DayOfYear

FM.DayOfYear

Month

DateTime.Month

FM.Month

MonthName

n/a

FM.MonthName

WeekOfYear

DateTime.WeekOfYear

FM.WeekOfYear

Year

DateTime.Year

FM.Year

Financial functions

FileMaker

Xojo

Xojo.FM

FV

n/a

FM.FV

Get functions

FileMaker

Xojo

Xojo.FM

Get(ApplicationVersion)

XojoVersionString

FM.Get.ApplicationVersion

Get(CurrentDate)

Var d As DateTime = DateTime.Now

FM.Get.CurrentDate

Get(CurrentTime)

Var d As DateTime = DateTime.Now

FM.Get.CurrentTime

Get(CurrentTimestamp)

Var d As DateTime = DateTime.Now

FM.Get.CurrentTimeStamp

Get(DesktopPath)

SpecialFolder.Desktop

FM.Get.DesktopPath

Get(Device)

n/a

FM.Get.Device

Get(DocumentsPath)

SpecialFolder.Documents

FM.Get.DocumentsPath

Get(DocumentsPathListing)

n/a

FM.Get.DocumentsPathListing

Get(PreferencesPath)

SpecialFolder.Preferences

FM.Get.PreferencesPath

Get(ScreenHeight)

DesktopDisplay.AvailableHeight

FM.Get.ScreenHeight

Get(ScreenScaleFactor)

n/a

FM.Get.ScreenScaleFactor

Get(ScreenWidth)

DesktopDisplay.AvailableWidth

FM.Get.ScreenWidth

Get(SystemDrive)

FolderItem.DriveAt (0)

FM.Get.SystemDrive

Get(SystemPlatform)

n/a

FM.Get.SystemPlatform

Get(SystemVersion)

System.:doc:VersionData</api/os/system.versiondata>

FM.Get.SystemVersion

Get(TemporaryPath)

SpecialFolder.Temporary

FM.Get.TemporaryPath

Get(UUID)

n/a

n/a

Get(WindowContentHeight)

Window.Bounds.Height

FM.Get.WindowContentHeight

Get(WindowContentWidth)

Window.Bounds.Width

FM.Get.WindowContentWidth

Get(WindowHeight)

Window.Height

FM.Get.WindowHeight

Get(WindowLeft)

Window.Left

FM.Get.WindowLeft

Get(WindowTop)

Window.Top

FM.Get.WindowTop

Get(WindowWidth)

Window.Width

FM.Get.WindowWidth

Logical functions

FileMaker

Xojo

Xojo.FM

Case

Select...Case

n/a

Choose

Select...Case

n/a

Evaluate

n/a

FM.Evaluate

ExecuteSQL

Database.SelectSQL, Database.ExecuteSQL

n/a

If

If...Then...Else, If

n/a

Number functions

FileMaker

Xojo

Xojo.Fm

Abs

Abs

n/a

Ceiling

Ceiling

FM.Ceiling

Exp

Exp

n/a

Floor

Floor

n/a

Int

CType (value, Integer)

FM.Int

Ln

Log

FM.Ln

Mod

Mod

n/a

Random

Rnd, Random

FM.Random

Round

Round

n/a

Sign

Sign

n/a

Sqrt

Sqrt

n/a

Truncate

n/a

FM.Truncate

Text functions

FileMaker

Xojo

Xojo.FM

Char

Chr

FM.Char

Code

String.Codepoints

FM.Code

Exact

String.Compare

FM.Exact

Filter

n/a

FM.Filter

FilterValues

n/a

FM.FilterValues

GetAsDate

DateTime.FromString

FM.GetAsDate

GetAsText

Format

FM.GetAsText

GetAsURLEncoded

EncodeURLComponent

FM.GetAsURLEncoded

GetValue

Arrays

n/a

Left

String.Left

FM.Left

LeftValues

n/a

FM.LeftValues

LeftWords

n/a

FM.LeftWords

Length

String.Length

Lower

String.Lowercase

FM.Lower

Middle

String.Middle

FM.Middle

MiddleValues

n/a

FM.MiddleValues

MiddleWords

n/a

FM.MiddleWords

PatternCount

RegEx

Position

String.IndexOf

FM.Position

Proper

String.Titlecase

FM.Proper

Quote

n/a

FM.Quote

Replace

String.Replace

FM.Replace

Right

String.Right

n/a

RightValues

n/a

FM.RightValues

RightWords

n/a

FM.RightWords

Substitute

String.ReplaceAll

FM.Substitute

Trim

String.Trim

TrimAll

n/a

FM.TrimAll

Upper

String.Uppercase

FM.Upper

ValueCount

String.CountFields

FM.ValueCount

WordCount

n/a

FM.WordCount

Text formatting functions

FileMaker

Xojo

Xojo.FM

RGB

Color.RGB

n/a

TextColor

TextColor property

FM.TextColor

TextFont

FontName property

TextSize

FontSize property

Time functions

FileMaker

Xojo

Xojo.FM

Hour

DateTime.Hour

n/a

Minute

DateTime.Minute

n/a

Seconds

DateTime.Second

n/a

Time

DateTime

n/a

n/a

System.Ticks

n/a

n/a

System.Microseconds

n/a

Trigonometric functions

FileMaker

Xojo

Xojo.FM

Acos

Acos

n/a

Asin

Asin

n/a

Atan

Atan

n/a

Cos

Cos

n/a

Degrees

n/a

FM.Degrees

Pi

n/a

FM.Pi

Radians

n/a

FM.Radians

Sin

Sin

n/a

Tan

Tan

n/a