Skip links

Introduction to FileMaker - Part 3

FileMaker training, courses, coaching

Introduction to FileMaker Pro - Part 3The first part of the introduction to FileMaker Pro dealt with the theoretical basics of FileMaker databases. In the second part, we went straight into the practical side of things, and we created a first Database under FileMaker to manage addresses and any number of notes per address. In this third part of the FileMaker tutorial, we will now breathe some life into the created database and make it easy to use. We will now look at layouts and add some new functions to the database. At the end of this introduction, our database will have basic navigation, and as the icing on the cake, the database can generate a digital vCard and a corresponding QR code from an address, which can be scanned at the touch of a button using an iPhone or other smartphone and inserted into the device's address book.

As we now want to expand the database that we created in the second part of the introduction to FileMaker, open it now. If you have not yet downloaded the database, you can do so do here.

Note: I created this introduction to FileMaker with FileMaker Pro Advanced 9. As of FileMaker 10, the toolbar is located at the top of the FileMaker window instead of on the left.

Design a user-friendly form layout

Once you have opened our sample database, select the following menu item in the menu bar:

View > Layout mode

Layout setting for the screen layoutYou are now in the Layout modein which you can change and arrange all the elements visible in the window. We want to change the existing layout to a screen layout - for this reason we should now rename the layout accordingly so that we can keep track of many layouts later. Of course you can name your layout however you like - but I recommend that you follow a clear standard when naming elements in FileMaker. In my previous developments, screen layouts have the prefix "scr." for "Screen". List layouts have the prefix "lst." and print layouts have the prefix "prt.". I will go into my standards for naming elements in a FileMaker database in more detail in the fourth part of this tutorial. It is best to name this layout "scr.addresses" and click on the [OK] button to confirm.

As we want to create a screen layout, we do not need a header or footer. To remove these from the layout, simply click on the "Header" button labeled accordingly and then press the Backspace or Delete key. The area is removed without any further query, as there are no elements in it. Proceed in the same way with the footer area.

Color selection of the fill color of the data partAs we want to change the layout to a screen mask, a pure white background would be unattractive. To change the background of the data area in which the fields are located, click on the button labeled "Data area". Then click on the color selection button for the fill color and select, for example, the third lightest grey from the color selection. The background color of the entire data section will then immediately change to the color you selected.

To ensure that the fields on the layout can be clearly identified as input fields, it is best to assign a white fill color to the fields on the layout. To do this, click on all fields while holding down the (upper case) key and then select the color white at the top left of the fill color selector. The <> field in the Excerptin which the notes are displayed, I have filled it with the lightest gray at the bottom left so that it stands out a little from the three fields <>, <> and <>.

Adding a navigation base

Since a FileMaker database rarely remains in its initial state forever and in almost all cases contains additional functions and layouts over time, we now create a basis for later navigation within the database solution. Of course, you can arrange the elements on your screen layout according to your own wishes. I will arrange the layout of our sample database so that the navigation is on the left and the later functions are at the bottom. To make the individual areas stand out from each other, I will place a gray rectangle on the Layout function rectangleNavigation and function area. To place a rectangle on the layout, select the "Rectangle" button in the layout functions and draw the rectangle in your layout at the desired position by holding down the mouse button. By default, a rectangle normally has a black frame and a transparent or white background. Select the desired shade of grey or color as the fill color and select either the same color or "no line" as the line color. Your layout should now look something like this:

Basic layout without buttons

We have now created a basic layout that we will use for this and all other screen masks. As you can see, the navigation area is on the left-hand side. The area for the functions of this screen is located at the bottom in slightly darker gray. Depending on the screen resolution with which you want to operate your solution, you can of course arrange all elements according to your wishes and requirements.

We now need buttons for navigation and functions. So far, two types of buttons have proven themselves for navigation: An inactive button that shows the current position within the navigation and active buttons that can be used to jump to other layouts.

Tool for adding a buttonTo create a button in FileMaker Pro, click on the corresponding button in the tools. Like the rectangle, you can now place a button anywhere in the layout, whereupon the dialog for the button setting appears:

Dialog box for the button setting

As we first want to create an inactive button, simply confirm this dialog with [OK]. Then enter the label for the new button directly. As our layout is an address layout, it is best to label the button with "Addresses". As this is an inactive button, it is best to select a very dark shade of grey as the fill color. Then click on the button with the right mouse button and select [Text format]. Set the text color to white and select [Bold] as the style. Your inactive button is now ready. Now repeat the process to create a template for an active button. To do this, simply drag another button directly next to your first button and repeat all the steps except for setting the fill color and text style. Label the button with "2nd layout", for example.

You may wonder why you should create a button that does not yet have a function. It is now simply easier for you to create more buttons by simply copying the existing one. Let's try this out right away: Now select the light gray button by holding down the key and drag it into the function area in the left-hand column. As soon as you release the mouse button, you have duplicated the button at the desired position. This procedure works with all elements in a FileMaker layout. You can change the label of the button by double-clicking on it - in this case I have named it "Function 1". With the buttons created, your layout should now look like this:

FileMaker basic layout with buttons

Add formula field and function button to the layout

In our database, all address details are stored in separate fields. This is useful and necessary for a good database. However, if you want to insert an address into a word processing program, for example, it is easier to copy the entire address block via the clipboard and paste it into your document. To realize this in FileMaker, we now create a formula that merges the address into a text field. To create a formula in the database, select the following menu item from the menu bar:

File > Manage > Database

I also use a specific standard for the names of formula fields. In my databases, formula fields start with the prefix "xCal_". Now enter "xCal_letter address" in the input field for the field name. Select "Formula" as the type and click on the [Create] button. A new window with the formula editor will now open. Please select [Text] as the result type at the bottom of the window. Now enter the following formula in the editor:

First name & " " & Last name & "¶" &
Street & " " & House no. & "¶" &
Country & "-" & Postcode & " " & City

The ¶ character is used in FileMaker to mark a line break. The character can be inserted into the formula via the "Operators" area in the middle of the formula window simply by clicking the mouse at the cursor position. To the right of this is the function area, in which all the functions available for a formula are displayed. Using the drop-down menu at the top, the functions can be displayed according to type, for example all text functions, number functions, status functions, etc. Many of the functions are largely self-explanatory, detailed information about each function can be found in the FileMaker manual or via the FileMaker help, which can be called up by pressing the [Help] or [F1] key.

If you follow the formula logically, the result of the created formula is a normal address block, as is usual when addressing a letter. Your formula should now look like this in the formula editor:

Letter address" formula

To save the formula field, click on the [OK] button and confirm the changes in the field definition window with [OK].

Select the <> fieldTo place the created formula field on the layout, click on [Field >] in the tool area and drag the field frame to the desired position in your layout while holding down the left mouse button. As soon as you have released the mouse button, the "Specify field" dialog box appears, in which you select the created field <> and confirm with the [OK] button. Once the field is on your layout, you can resize it so that all three lines are displayed in the field. As this field is an automatically calculated formula field, you cannot enter any data in the field in scroll mode. For this reason, I always color automatically calculated calculation fields in my FileMaker solutions a little darker than normal input fields, so that the user can see at first glance that it is not a normal input field. If you wish, you can now assign a darker fill color to the field, as you have done before with other fields.

So that you can copy the content of the <> formula field to the clipboard conveniently with a mouse click, create a new button, preferably directly under the formula field on your layout. The easiest way to do this is to drag one of the light-colored buttons already created (e.g. "Function 1") under your formula field while holding down the [ALT] key. As the button has not yet been assigned a function, you can change the label by double-clicking on it, for example to "Copy". To assign the "Copy to clipboard" function to the new button, right-click on the button you have created and select "Button settings", which will open a corresponding dialog box.

Key setting' dialog box - 'Copy' function

You can now assign a specific function to the button in the left-hand column. Select the "Copy" function in the "Edit" category. In the right-hand area, select "Go to target field" and enter the created formula field "xCal_letter_address" as the target field. After you have confirmed both dialog boxes with [OK], your button is now assigned the "Copy" function. You can test the function by clicking in the menu bar under

View > Browse mode

in the Browse mode and click on the button created, whereupon the content of the formula field should now be in the clipboard and the content of the field should be completely highlighted.

Adding a web viewer for a QR code of the address field

As the icing on the cake, we now add a web viewer to our layout, in which a QR code of the address called up is generated and displayed. A QR code is a two-dimensional barcode that can be read with an iPhone or other smartphone. For the iPhone, for example, there is a free app for this purpose Qrafter. To generate a QR code, a function of the Google API can be used in a simple way. To do this, simply call up a URL to which any text can be attached in URL-coded form. A detailed explanation of this function in connection with FileMaker can be found at briandunning.com read more.

To ensure that the QR code not only contains the pure address field, but also a vCard that can be read directly with an iPhone and transferred to the address book, we now first create another formula field that calculates a vCard from the entered address. The exact specification of a vCard can be found, for example, at Wikipedia look it up. Open the field definition, enter "xCal_vCard" as the new field name, select the type "Formula" and click on [Create]. Now enter the following formula:

"BEGIN:VCARD" & "¶" &
"VERSION:3.0" & "¶" &
"N:" & Name & ";" & first name & ";;;¶" &
"FN:" & First name & " " & Last name & "¶" &
"TEL;type=WORK;type=pref:" & Phone & "¶" &
"TEL;type=WORK;type=FAX:" & Fax & "¶" &
"ADR;type=WORK;type=pref:;;" & Street & " " & House no. & ";" & City & ";;" & ZIP & ";" & Country & "¶" &
"EMAIL;type=INTERNET;type=WORK;type=pref:" & EMail & "¶" &
"END:VCARD"

Then click on [OK] and confirm the creation of the new formula again with [OK]. The above formula contains a rudimentary code for a vCard - of course, much more information can ultimately be stored in a vCard, and the handling of contact data such as telephone or fax is much more flexible and can, for example, be divided into home and work addresses. But this introduction is ultimately intended to show you how it works, and you should still have something to do on your own... ;-)

Adding a web viewer to the layoutNow we want to display the vCard as a QR code on our layout. To add a web viewer to your layout, click on the corresponding button in the toolbar. Then draw a frame at the desired position in your layout in which the web viewer should appear. I have sensibly added the web viewer to the layout to the right of the input fields. After you have released the mouse button, a dialog for setting up the web viewer appears. Enter the following line in the "Web address" field:

"https://chart.apis.google.com/chart?chs=200x200&cht=qr&chl=" & Addresses::xCal_vCard

This line is used to generate a QR code from the <> field via the Google API. If you now switch to browse mode, your layout should now look like this:

Final FileMaker layout - Introduction to FileMaker Part 3

We have now reached the end of the third part of the introduction to FileMaker Pro. I hope you have enjoyed the tutorial and that it has given you even more enthusiasm for developing FileMaker databases. In the fourth part, I will go into more detail about programming FileMaker scripts and introduce the interesting "Custom Functions" function from the Advanced version of FileMaker. Until then, I wish you continued success and lots of fun developing FileMaker databases.

FileMaker training and coaching from goFileMaker

Would you like to delve deeper into the subject of FileMaker database development or do you already have your own FileMaker solution that you would like to develop further? With our coaching and training services, we are happy to help you with the development of FileMaker databases nationwide via telephone and remote maintenance. We will be happy to discuss your individual requirements in a personal meeting. To book a FileMaker coaching session, you can simply order the desired number of hours in our online store and let us know your preferred date in the order comment. We are also happy to advise you in advance by e-mail at info@gofilemaker.de.

You can download our sample database here:

Download FileMaker sample file

All previous parts of the introduction FileMaker

Part 1: Historical background and versions

Part 2: Practical part with creation of an address database

Part 3: Layouts, navigation, buttons, QR codes

Part 4: Fields and formulas, relationships, scripts, custom functions, plugins, SQL

Leave a comment

  1. Hello and thank you for the tutorial...
    However, I have a problem with reading the QR code.
    The Qrafter app reads the data, but always with a message that the code is faulty and that it is trying to extract as much information as possible. However, it then transfers the data to the iPhone address book without any errors. So far so good. What is very annoying, however, comes now:
    Unfortunately, I have noticed that the date of birth BDAY, which I have added to the code, is read out and also added to the address book (both iPhone and after syncing the Mac), but probably not in the date of birth field, but it inserts a second date of birth field in the address mask. Perhaps you can tell me what the problem is and where the error lies.
    Best regards

  2. To my first post:
    Unfortunately, this means that the date of birth read via the QR code in my iPhone is not transferred to the iPhone's birthday calendar...

  3. Yes, I also noticed the error message in Qrafter. However, I couldn't find any errors and Qrafter takes over all the data. The generated code should actually be error-free.

    Regarding the question about the date of birth: In a vCard from iCal, the date of birth is coded as follows:

    BDAY;value=date:1980-04-25

    Does it not work this way? If not, I would save the content of the vCard formula as text (.vcf) and see if iCal imports the file correctly. Because if so, it's probably Qrafter's fault...

  4. Hello Markus,
    it already reads the date of birth correctly with the BDAY layout you specified above.
    Actually the same as in ical, but I think the problem may be with iOS4. Because an item is created with the date and an item (birthday)... and this leads to the fact that I can then add a birthday field (the correct one) in ical after syncing via itunes.
    I therefore think that you definitely have no error in the code and that I have used the BDAY formula correctly...
    Greetings Christian
    PS: any other ideas???

    1. Then it also sounds to me as if it is a bug in iOS or perhaps also in the synchronization process...? According to your explanations, I think the error is either in Qrafter or in the contacts app in iOS 4. Have you updated to 4.3.3 yet? ;-)

  5. Yes, this is the current version 4.3.3
    Since Qrafter reads the data correctly (if I read it as .txt) I can import it manually correctly as .vcf into the mac address book, we can actually only attribute the error to iOS, right?
    Greetings
    PS: Let's hope for iOS 5, which hopefully won't be long in coming :-)

      1. Hello Markus,
        I just wanted to get in touch again.
        Yesterday Qrafter was updated... since then it recognizes the birthdays correctly and they are displayed correctly in iOS 4 :-)))
        Best regards
        PS: However, the error message that incorrect code is being read still appears :-(

  6. Hello Markus,
    Thank you so much for the introduction - I had an immediate sense of achievement ;-)
    Best regards, Irene

  7. Hello Markus,
    Is there a way to generate the payment code for invoices in FileMaker and then print it on invoices?
    https://www.bezahlcode.de from Stoeger
    Unfortunately, they only provide the code for MacOs or an integration for WordPress...
    Is there a way to convert this into code for FM and if so, could you write a tutorial about it?
    Best regards and many thanks
    Christian

  8. Hello Markus,
    I am trying to include the company, department and position in the QR code. Unfortunately, I fail at the position:

    I have indicated the following:

    N:Last name;First name;;Title;
    FN:Title First name Last name
    ORG:Company;Department
    TITLE:Position

    What's wrong with that?

    Kind regards
    Eckart

  9. This is how I created the formula in Filemaker:

    "BEGIN:VCARD" & "¶" &
    "VERSION:3.0" & "¶" &
    "N:" & Name &";" & First name & ";;" & Title & ";¶" &
    "FN:" & Title & " " & First name & " " & Last name & "¶" &
    "ORG:" & Company & ";" & Department & "¶" &
    "TITLE:" & Position & "¶" &
    "TEL;type=WORK;type=pref:" & Phone & "¶" &
    "TEL;type=WORK;type=FAX:" & Fax & "¶" &
    "TEL;type=CELL;;type=pref:" & Mobile & "¶" &
    "ADR;type=WORK;type=pref:;;" & Street & ";" & city & ";;" & ZIP & ";" & country & "¶" &
    "BDAY;value=date:" & YearNumber ( Birthday ) & "-" & CharacterRight ( "00" & MonthNumber ( Birthday ) ; 2 ) & "-" & CalendarDayNumber ( Birthday ) & "¶" &
    "EMAIL;type=INTERNET;type=WORK;type=pref:" & Email & "¶" &
    "URL;type=INTERNET;type=WORK;type=pref:" & Internet & "¶" &
    "END:VCARD"

  10. Thanks for the instructions worked well for vcards.
    Now I tried to get appointments as ical data into an Android in the same way via QR code. But unfortunately it doesn't work...
    As described above, a field is calculated with ical data and output as a QR as described above. It also reads it, but does not recognize it as an appointment, only as text.
    The same data, copied and pasted from the text field into the Google Chart page works without any problems and is recognized as an appointment.
    Does anyone have a solution for me or an idea for troubleshooting? Thanks for reading and your ideas!

Share this page:

ERP software as flexible as your company.
We will be happy to advise you.

Customizable ERP software for Mac, Windows and iOS.

You are here: Introduction to FileMaker Pro - Part 3 of the tutorial on goFileMaker.