UserGuide

Migrating from FileMaker

From Xojo Documentation

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 Dim
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 Date FM.Date
Day Date.Day FM.Day
DayName n/a FM.DayName
DayOfWeek Date.DayOfWeek FM.DayOfWeek
DayOfYear Date.DayOfYear FM.DayOfYear
Month Date.Month FM.Month
MonthName n/a FM.MonthName
WeekOfYear Date.WeekOfYear FM.WeekOfYear
Year Date.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) Dim d As New Date FM.Get.CurrentDate
Get(CurrentTime) Dim d As New Date FM.Get.CurrentTime
Get(CurrentTimestamp) Dim d As New Date 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) Screen(0).Height FM.Get.ScreenHeight
Get(ScreenScaleFactor) n/a FM.Get.ScreenScaleFactor
Get(ScreenWidth) Screen(0).Width FM.Get.ScreenWidth
Get(SystemDrive) Volume(0) FM.Get.SystemDrive
Get(SystemPlatform) n/a FM.Get.SystemPlatform
Get(SystemVersion) n/a 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.SQLSelect

Database.SQLExecute

n/a
If If...Then...Else

If

n/a

Number Functions

FileMaker Xojo Xojo.Fm
Abs Abs n/a
Ceiling Ceil 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 Text.Codepoints FM.Code
Exact StrComp FM.Exact
Filter n/a FM.Filter
FilterValues n/a FM.FilterValues
GetAsDate ParseDate FM.GetAsDate
GetAsText Format FM.GetAsText
GetAsURLEncoded EncodeURLComponent FM.GetAsURLEncoded
GetValue Arrays n/a
Left Left FM.Left
LeftValues n/a FM.LeftValues
LeftWords n/a FM.LeftWords
Length Len
Lower Lowercase FM.Lower
Middle Mid FM.Middle
MiddleValues n/a FM.MiddleValues
MiddleWords n/a FM.MiddleWords
PatternCount RegEx
Position InStr FM.Position
Proper Titlecase FM.Proper
Quote n/a FM.Quote
Replace Replace FM.Replace
Right Right n/a
RightValues n/a FM.RightValues
RightWords n/a FM.RightWords
Substitute ReplaceAll FM.Substitute
Trim Trim
TrimAll n/a FM.TrimAll
Upper Uppercase FM.Upper
ValueCount CountFields FM.ValueCount
WordCount n/a FM.WordCount

Text Formatting Functions

FileMaker Xojo Xojo.FM
RGB Color.RGB n/a
TextColor TextColor FM.TextColor
TextFont TextFont
TextSize TextSize

Time Functions

FileMaker Xojo Xojo.FM
Hour Date.Hour n/a
Minute Date.Minute n/a
Seconds Date.Second n/a
Time Date n/a
n/a Ticks n/a
n/a 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

Learn More

To learn more about Xojo and how you can use it to replace or supplement FileMaker, check out these topics: