We’ve created these short tutorial videos to help explain FileMaker topics for new developers. We’ve chosen topics that were either tricky, or that have amazing features once mastered. These videos are for the community, so we would love feedback. Send any questions you may have or topics you would to see demonstrated to eleanor@app.works.

Lesson 1: The Data Viewer Watch Tab

Lesson 1 Transcription

The data viewer is useful for writing and debugging scripts and calculations. The data viewer is a built-in developer tool in FileMaker 17 – before version 17, you needed a copy of FileMaker Pro Advanced to use the Developer Tools.

To turn on Developer Tools in your settings on a Mac, go to FM Pro Advanced → Preferences → General → Use Advanced Tools. On a Windows, go to Edit → Preferences → General → Use Advanced Tools.

You should now see Tools in the top menu. Go to Tools → Data Viewer. There are 2 tabs –  the Current tab and the Watch tab. Current tells you fields or variables in use by a script while it is running. Because of this, the current tab will usually be empty unless you’re running a script through the script debugger. Sometimes you’ll see global variables here, which are the ones with the double dollar signs, because they are independent of scripts.

If we switch over to the Watch tab, you’ll likely see an empty window here as well, unless you’ve used the data viewer before. The Watch tab is used to monitor expressions, which are created manually by clicking the add button. They’ll remain in this list until you delete them. Expressions can be created to test long or complex calculations, or to watch variables’ end fields while running scripts or moving through records.

To add an expression, click the Add button – this looks a lot like the calculation window that opens in other parts of FileMaker. The biggest difference is a Results section that shows you the results of your calculation instantly. The Automatically Evaluate checkbox automatically evaluates your expressions without needing to click the Evaluate button.

We’ll write an expression to calculate a date that is two weeks from today. We’ll use FileMaker’s native function, Get Current Date and just add the number 14 to it, in order to produce a date that is two weeks from today. We’ll click Monitor to save it, and we can now view it in our list. The data viewer is context-based, which means that you will need to be sitting in the correct context in order to reference the correct field in your calculations. Otherwise, you will see an unrelated table error.

We’re going to check to see if this date is past due by comparing it to the current date. Let’s start a new expression and we’ll choose the due date. We’ll check to see if it is less than the current date – if it is, we’ll see a 1 in the current result, meaning the calculation is true. Otherwise, we’ll see a 0 for false.

Now that we’ve completed our expression, we’ll click monitor. We are looking to see if this date is less than the current date, which, as of this recording, is December 5th. We’ll flip through some records and watch the result change as the date changes.

If we had written this to test a calculation before using it inside a script, we could simply copy this expression and paste it in our script wherever we need it. This is handy when writing long or complex calculations. It is much easier to test out your calculations here instead of testing it inside a script, which can be very tedious – we may be speaking from experience!

Lesson 2: Custom Logo Styles in FileMaker

Lesson 2 Transcription

In this lesson, learn how to take a logo and add it to a theme. You’ll then add the logo as a style within the theme, and then you can replicate it easily across your file without having to copy and paste.

The first step is to get a logo from somewhere. Grab an image file that is either .png or .jpeg, and save that to your computer. Next, go into FileMaker. Imagine we want to put a logo into the right hand corner. Then go to layout mode. Here you have the theme. Normally you might go to your files and drag it onto the layout, but in this case, the logo is huge and not built to be in this size of layout. Normally you’d have to go and reduce the size, while holding the shift key to save proportions. This is the old-fashioned way to do things, but it’s not the best way.

The easier way is to take this logo and put it into a theme. Instead of dragging a raw image file into FileMaker, take a rectangle object and draw it onto the layout. You’ll notice that there are different styles for those objects that are in this theme. We’ll stick with the default, and we’re going to save a new style called Logo. Now go to the inspector, and then go to the appearance palette. You can choose the fill style. The options include no fill (invisible), you can choose any solid color, you can choose a gradient, or you can choose an image. In this case we’ll choose an image. Preferably this image is a .png that has background transparency, like an alpha layer. However, this isn’t required.

We’ll insert that, and you’ll now see that this shape is getting filled with our logo, but it’s getting cut off. There are several different options. The original size option will center it at the full size of the image. Scale to Fit is what we want. This will scale your object and it will never be out of the proper proportions. If you choose Scale to Fill, it will fill it up as best it can in one dimension, but it will cut off the logo in the other dimension. Slice and tile are really for special applications. What we want is Scale to Fit.

You can see that this style is still the default style. There is an asterisk, and the triangle is red, which means we’ve got unsaved changes for this style. We don’t want to save these changes to the current style, otherwise we will turn the default shape into a logo and then anytime someone tries to draw a shape on the layout, it will draw a logo instead. We want to save this as a new style. In this case we’ll call it AppWorks Logo.

We’ll save this style into the Universal Touch theme. You can see that the red triangle is here, which means we’ve got unsaved changes in this theme, which means we’ve added a new style to the theme. This style, the AppWorks Logo style, won’t be available to other layouts until we save the changes we’ve made to this theme. We’re going to save the changes we’ve made to the theme, which will give us a warning because it can overwrite things. In this case we’re making a new style, so it’s not going to overwrite anything.

Now we’ll go into our first layout →  Task List. We now want the logo in our upper right corner. We’ll choose that shape and draw that in the corner. FileMaker is going to use the default style. We can go to the style palette, choose Appworks Logo, and there it is! To make it bigger, we can drag – it won’t override the proportions.

We can anchor it to the right side so that when we go back into browse mode and open the window, it sticks to the right hand side.

If I go back into layout mode and take the same object, I can copy it, go to the next layout, and paste it. If I want to align them among both layouts, you can select them, you can look at the position with the ruler. Note the dimensions from top and bottom. Go to other layout and position them in the exact same position.

If I now wanted to change this logo to something else, just go to layout mode, choose your object, go back to the palette, choose a new image and save the style. Save it back to the theme, it will be saved and changed and updated across the entire file. Therein lies the power of themes and styles in FileMaker.

Lesson 3: Naming Conventions

Lesson 3 Transcription

Establishing naming conventions for your application early on can help make your code easier to understand for yourself and others on your team. Let’s take a look at some table names. We like to follow the convention of singular nouns for table names, as we think of records in a table as single entities, so a record in a task table is a single task

Let’s move on to field names. We can see here that this application is following the convention of Upper Camel Case. Other conventions you might see are Lower Snake Case, or Lower Camel Case. In FileMaker, field names can contain spaces, so you might also see this.

Whichever convention you choose, the most important thing is to remain consistent. Something else you may see are field names that are prefixed with the letter Z. People do this so that when you sort by field name, you can sort fields that you don’t necessarily want to see all the time to the bottom of the list. These are things like created by, modification timestamp, modified by. Other prefixes you might see are fk, standing for foreign key. If you prefix all your foreign keys with fk, you can group them all together just by sorting by field name.

Let’s move on to the relationship graph. We can see that this app is following anchor buoy. The convention we follow for naming our table occurrences in anchor buoy is to first set our anchor’s name. It’s going to be the first letter of the anchor table name, followed by 2 underscores, then the anchor table name. Our buoys have the first letter of the anchor, followed by an underscore, then the buoy table name. Buoys further down the chain have the first letter of the anchor table, any intermediate table names, then finally the name of the buoy.

Something else you might come across on the relationship graph are table occurrences that contain a tilde, followed by some descriptive text. You typically do this when you are applying some special condition to the relationship. For example, if we were to create a sort condition, we might do this (see onscreen). Similarly, if we were to create a Cartesian joint, we might do this (follow onscreen).

Lesson 4: Data Viewer’s Current Tab & Script Debugger

Lesson 4 Transcription

Data Viewer and Script Debugger are part of FileMaker’s built-in developer tools (see Lesson 1 to enable these tools). Go to Tools → Data Viewer. You will see Current and Watch tabs. The Current tab shows fields and variables in use by a script while the script is running. For this reason, it is often empty unless you are currently running a script through the Script Debugger. You might see global variables here (with the double $$) since they are independent of scripts.

We’ll use the Current tab to run a script through the Script Debugger. Close the Data Viewer for now. To open the script workspace, go to Scripts in the top menu and click Script Workspace. We’ll run the script called Task.Add Related Record through the debugger.

The task needs an additional assignee, which we can do by clicking this Add Assignee button. When this script is run, a window will open with a list of assignees in our database to choose from. This script will automatically omit anyone who has already been assigned. Additionally, I’d like to also omit people who are not currently active in the organization, in this case our App Tester assignee.

If all goes well, we’ll be left with a list of assignees who are current and not currently assigned to the task, which will be Jennifer Johnson and John Smith.

Let’s head back to the task detail so we can debug the script. To debug the script, we can access the Script Debugger two different ways. You can access the script directly from the script workspace by clicking the bug icon. This is pretty convenient for most scripts, provided its not reliant on script parameters being passed in via a button. In that case, you can use the second option, which is opening the Script Debugger from the Tools menu. Once it’s open, you can simply click the button to activate the script, or take any other action necessary that will activate a Script Trigger. Once that has happened, the script will automatically be opened within the Script Debugger.

Let’s go over the different controls you can use to debug them. First up is the Edit Script button. Once a script is currently running, you can click this to open it up in the script workspace where you can then make changes. Once you save those changes, the script will automatically halt in the Script Debugger. Then you have the Run button. This will basically run your script through all the way to the end, or until a breakpoint is encountered. The Stop button will halt the script at any point.

The Step Over control will execute the script one step at a time without entering subscripts. If the script step is a performed script, the Script Debugger won’t execute the subscript, but it will just proceed to the next line of the calling script. The Step Over control is very similar in that it will also execute the script one step at a time, but it will also enter and show steps in subscripts.

Step Out will execute all script steps in the current script, and if the script is a subscript, it will return to the line right after the performed script step in the calling script. If the script is not a subscript, the step out command will cause the Script Debugger to execute all remaining scripts and subscripts until it encounters a breakpoint.

The Set Next Step control allows you to manually select a script step in the currently running script and set it as the next script step to be processed. So, clicking this will not make that script step run. You will still need to use one of these other controls to actually execute the script, but it will set it as the next one to run and will skip any script steps in between what had been the current running script step and what you just assigned as the next one. The Enable or Disable Script triggers button allows you to temporarily disable or enable all Script Triggers in a file. When it’s highlighted in blue here, you can see that it’s currently enabled. If I were to select it again, it would be disabled. Last but not least is the Data Viewer button – this will open the data viewer for us.

There are a few more things to mention about the Script Debugger – it has a Pause on Error checkbox that will pause scripts when errors are encountered. This works even when the Script Debugger is closed – it will automatically open the Script Debugger when an error is encountered. Here you’ll find the Call Stack, which will be a list of all scripts set to run. You can select a script in the Call Stack list to view that scripts’ steps in the display area. Now that we know how to use the controls, let’s go ahead and start our script to test them out.

We’ll start by clicking the Add Assignee button. We now have our first script added to our Call Stack, and we can see that it is calling the correct script, Task.Add Related Record, and that no parameters were passed in. So to continue, I’m going to click the Step Into control. Also, let’s go ahead and open up our Data Viewer, so that we can watch what’s happening as we go through the script. You’ll notice there are a few fields that are showing up in our current tab. These are the fields that are being  used in the script that’s currently running. To continue, we’ll click the Step Into step, and we can see that the parent primary key, which was supposed to take on the value of the tasks primary key, happened correctly.

We now have a list of related keys, and another variable has been set to count the number of related records. In this case, it looks like there’s only one. Behind the Data Viewer here, that window that I mentioned earlier has opened, and by default, it’s showing all of the people in our Assignee table, including Some Buddy, App Tester, John Smith, and Jennifer Johnson. As we continue through the script, we should eventually get to a Found Set of just John Smith and Jennifer Johnson.

The script will enter Find Mode, and it’s going to start a loop. Because we only have one related record, we should only have to look through this once. Basically, this script is doing a find for any current assignee of the task, and this will eventually be omitted from our found set. We’ll continue going and now that we’ve reached the end of our loop, we can scroll down and see that it’s about to perform the additional script steps that I’ve added. I’m also going to set the assignee’s active field to be null so that when we Perform Find, we are in a Found Set of the person who is not active, and the person who’s already assigned. As we click Step Into, it will now show only the omitted records, giving us the exact set we wanted.

The next script step is Perform Script. Now if I wanted to step into the subscript, we could choose the Step Into control, but instead we’ll just let it run and click Step Over to be taken to the next line. But, as you can see in the background here, it appears that sort happened successfully. We’ll exit our script now, and it looks like it was a success!

Lesson 5: Search Features Part 1

Lesson 5 Transcription

Welcome to Part 1 of 3 talking about Search Features in FileMaker Pro. FileMaker has an interesting concept when you do a search called a Found Set. Let’s do a really simple search – if we just hit the Find button (Command/Ctrl F), it brings you into Find Mode, and it uses the same layout you use for data entry. You can do something really simple like Portland in the city field – enter or Perform Find will execute that find. So the Found Set is the number of records in your database that match the search that you just did. One of the interesting things you’ll see is you can click on the chart to flip the Found Set from the positive and the negative – if you click the button to flip it in the menu and choose that feature, you can get the opposite, which are all the records not in Portland. Sometimes that’s really useful because you want to find something that’s really complex and the search for the opposite of that thing is actually simpler.

FileMaker allows you to search more than 1 field at the same time. If I only want to find Portland, Oregon, I can put in Portland into the City field, then in the State field OR. This will find only Portland, Oregon. This gives me a smaller set of records. FM also has, when looking at a search, a drop down menu called Operators. The default mode is Starts With – it actually searches for anything that starts with that particular word. You also have Exact Matches – there are two different types of Exact Matches that match exactly with the field.

Ranges are interesting. Let’s take a look at a few of these. Let’s say I wanted to find all of the records that were contacted in 2017. One way to do this is to put in a date range – 1/1/2017.. Either two or three dots works for the range field 12/31/2017. That’s kind of laborious, but that’ll give you the 283 records that match.

FM offers a really cool feature – in a date field, just put in 2017 and then it’ll automatically know that you’re looking for a year and it’ll automatically put in */*/2017, which is the same as the date range above.

You can even combine these and say do this search for 2017 and then find only for people who are in OR. That finds just this small set of records for which both things are true. An interesting thing you can do to join these is also do, rather than both types of search in one request, you can do two separate search requests. Say, find all the records that are in OR, then make a new request for the ones last contacted in 2017. That’ll actually get you, rather than the records that had both things true, will get you all of the records that had either thing true – a much larger set of records.

Range features – if I just type in Portland, I get Portland and S Portland. You can modify your previous search by hitting Command R/Ctrl R, which is Refind. You can see here in the menu it’s modify last find. That brings up the last search that you did – it might’ve been pretty complex, so that’s a good timesaver. I’m going to put in an =portland and that will still get me South Portland, because it’s looking for that exact word. If I put something in like Port, I get Port Richey, and if I get an =Port, that’s going to not search for Portland anymore, it’s going to look for the whole entire word Port. If I put in ==port, I get nothing. There’s nothing that’s just Port. If I put in ==portland, I get all the ones that are Portland but not South Portland. So those are some of the other features that you can get when you’re looking at the operators function.

Duplicate values are really useful if you’re looking for duplicate names of companies. I have some companies in my sample set of data (free data that comes with Search Results). If you use the duplicate value operator, that will find all of the records that actually match where those things are duplicated. These don’t necessarily jump out right away because I haven’t sorted them yet. If I sort them by company name, I can see I have 3 Amanda Jones’ in different cities, Archdiocese of PA, etc. so I have duplicate records.

Let’s take a look at one more thing – in Operators, you also have greater than and less than. What if you want to find all records contacted after June 1st of 2017? That would be >6/1/2017. That will find all records greater than that. If you sort by date, you can see records in chronological order as descending or ascending order. Notice that 6/2 is there but not 6/1. There’s also greater than or equal to, which is >= in FileMaker. This will actually find the 6/1 as well as the 6/2/2017.

Lesson 6: Search Features Part 2

Lesson 6 Transcription

We’ve talked about Found Sets and basic searches in the last video and also looked at the Operators menu. Let’s talk about Relational Search. On this particular layout, all the records that we’re searching on are in the company table. If I click on one of these, I can see I’ve got data in 2 other tables. Some of these tables might have more than 1 contact, some might have an invoice.

If I want to find all company records that have an invoice for a telecaster, I can go to find more and put telecaster in any of the lines. This will find all of the records that have a telecaster in any line from the related data. You can also do combined searches for this. For example, if you only want to find somebody whose name starts with E that bought a telecaster, that would be Refind (Command R/Ctrl R) that keeps the telecaster in here, then I go to the First Name and put E – this will find only people whose names start with E that have bought a telecaster. Only 12 names in this list. You can further narrow that down – you can only find ones that are in Washington, D.C. with names that start with E that bought a telecaster – only 1 record.

You can omit search requests. In Search Mode, look in the menu – you get a different menu bar. A new request we looked at in the first video, when you look for things that don’t overlap. Everybody in OR, Everybody in WA. If I do a new search, I get everyone in either of those two states, which is pretty cool. You can do a second request – everyone that’s in OR. Second request, omit all the ones that are in Portland. So I’ll find everyone in OR, but I don’t want to see everyone that’s in Portland.

If I did the same search but in the other order – first record Omit Portland, new request (not Omit) for Oregon, you would think that you would get the same result, but you don’t. We’ve got 20,000 results with a bunch of records that aren’t in OR at all, and some that are in Portland. Omit requests must be the second request, not the first one. You can also have multiple Omit requests – you can say you want OR but not Portland (Omit), Bend (Omit) and Eugene (Omit). I call these positive requests for an include request and 3 negative requests to omit. That gives me my list of other cities that are not those three.

I talked about Refind being useful – in the drop-down menu, this is Modify Last Find. I’ll see what I previously searched for. This is a good way to keep sculpting it. If we’re doing a large accounting report, I find this to be a really useful feature.

Lesson 7: Search Features Part 3

Lesson 7 Transcription

This is part 3 of using FM Search Features. We’ll talk about the Quick Find feature that’s built into FM and some of the caveats and cool features that aren’t obvious about this feature. The other thing we’ll talk about is searching against email addresses, which isn’t as obvious as you might think.

We’ll start with Quick Find. FileMaker by default puts a Quick Find widget at the top of the layout. There’s a keyboard shortcut where you hide the menu bar area. If this is hidden you don’t have access to Quick Find. A second thing you need to know about Quick Find is that users can control and configure that menu bar. They can actually click Customize Toolbar when they’re in layout mode and use a different toolbar that doesn’t contain Quick Find. A user could defeat the feature for Quick Find in their copy of FileMaker, which will affect your solution and any other solution on that computer. Quick Find is on by default.

Quick Find is pretty neat because it’ll search against everything on the layout by default. If I search Honda, it’ll search against my database and find all the records that match Honda. If I put in Portland, it’ll find all my Portlands. If I search for date, like everyone who was contacted in 2018, it’ll search against whatever date fields are on the layout. This is useful, but not that useful on a detail layout, because the record doesn’t change.

If I’m looking for AppWorks, Quick Find will take me to the first record that matches, but it doesn’t work well when looking for multiple records. Going back to my Portland example, if I hit Portland and hit Enter, nothing changes on the screen. It isn’t obvious that anything has changed, but my Found Set changed from one record to 267 records. It’s actually more useful to use Quick Find when you’re on a list view. If I put in a name, I instantly get the reaction I’m looking for, which is the set of records actually changing on the screen.

Here’s a cool feature about Quick Find – you can configure which fields on the layout are searched with Quick Find. When you go to layout mode, if you don’t want the State field to be searched on, for example, there’s an option on the right that says include field for Quick Find. There’s a green icon that shows you whether that field is on or not for Quick Find. If you have a field in your database that’s related, for example, the invoice number, if you have that field set for Quick Find, it will show a yellow search magnifying glass telling you that the search will be slower – its a related field, so it won’t be as fast. Generally those are to be avoided, but there’s some utility to it as well. That’s how you can configure and control it – I took out the State field, so if I search for OR, it won’t show Oregon anymore. Here’s ortho and New Orleans, etc.

The second feature is that Quick Find joins multiple fields together as one, even across different field types. Let’s say I look for everybody in Orlando, but I only want to find the ones in Orlando that have a a contact date in 2014. I can put Orlando 2014 in and FileMaker will magically join those fields together. It knows that 2014 is a year, and knows to look in the date field for a year. When you click out, it expands it to */*/2014 – that same thing works in Quick Find as well. It’s really cool that FileMaker will combine those together. If I put in blak 2014, then I get the record for Bruce Blakley. It works in either order, so if I put in 2014 blak, I get the same search. The order doesn’t matter, and it will search on multiple types of fields. It’s not just date fields and text fields, it will also search on text fields. If I want to find all invoices that are $1584, I can search 1584 and this will return all records that have that number.

I’ve configured this to search in the zip code and phone number fields, and I don’t have the invoice dollar amount set to be searched. When I go to my detail layout, I don’t have the invoice amount set to be searchable in QF. If I turn that on and then do my exact same search again, now I’ll actually get a search that includes all of the searches for that invoice $ amount as well. I do want to note that those related searches are slower. Even though this is a hosted file that has 20,000 records, it’s still pretty fast. The more searches you do against fields that are related, the more distantly related, and any kind of unstored calculation field are going to be slow searches.

The second thing that I wanted to show is searching for emails. When you do a search, you can use the operator. One of the operators is the @ sign – it looks for one specific character. For example, if I wanted to search on Keith, I can just type in Keith. If I wanted to find it, but wasn’t sure what one of those letters was, I can type k@@@h, that will search on any words any letters, but it still has to be a five letter word that will that will match that search. That’s a little tough to demo because there aren’t many words start with that. An easier way to do that is to actually type k and rather than using the @ character, use the asterisk character. Type in k*h and that will do the same thing, except this one actually finds Kenneth and Keith and a bunch of other things that start with K and end with H.

Let’s go back to the @ character because one of the things I really want to be able to do is to be able to just put in an email address. You would think that if you did a search for that it would work, but it won’t. I’m going to show you two ways around it. One way around it is if you put that in quotes. Quotes are one of the other operators. You can actually search for something that’s in quotes, which will match the specific phrase and it will ignore that character, so it will actually search more intelligently. I could even put in Matt@* and that will define Matt at any email address.

A second way to search correctly on an email address is by going to Manage Database and going into your table that has the email field. Double click on the email field. By default the language is English or the native language of whatever country you’re in. At the very bottom of the list there’s actually a choice for Unicode. Store the language of the field as Unicode, instead of English. Now if you do a search it will actually work correctly, because it’s basically ignoring that @ character. There is an issue, though, if this entered with uppercase. If I modify my email address and put an uppercase M, the Unicode doesn’t work. The downside of a Unicode is that it’s case sensitive, whereas the normal FileMaker search is not case sensitive. The normal FileMaker search doesn’t care if it’s upper or lowercase. For example if I put in like you know aPPwO, that’s actually still going to find AppWorks even if the case doesn’t match. If you turn Unicode on, it will defeat that.

Lesson 8: Buttons and Button Bars

Lesson 8 Transcription

Lesson 8 will focus on Buttons and Button Bars in FileMaker. There are two different kinds of objects you can put on a layout – these are Buttons and Button Bars. Button Bars are slightly different than Buttons. Buttons are single objects, and they have four states – there is the normal state, hover state, pressed state and an in-focus state. The in-focus state is basically when you tab to something and it is slightly highlighted. Button bars also have the same states, only the normal state is called “inactive.” Then there’s hover, pressed and active.

The two different kinds of Buttons, called Button and Popover Button. When you’re in Layout Mode and you want to put a Button on the layout, you have to choose either a Regular Button or a Popover Button. You can put layout objects on that Popover or Regular Button, it just fires a script or scripts.

Button Bars can also be either a Popover or a Button. If you go into Layout Mode, notice you can actually switch back and forth. When we double click on this Button Bar segment, you’ll see on the tool palette that you can actually choose either a Button or a Popover Button. You’ve got a Popover and you can choose which direction you want it to pop. You can choose the title bar, or you can choose to not show a title bar at all. I don’t usually like to have a title bar. However, with a Button you can’t actually switch back and forth – you have to choose one or the other. If you decide partway through your development that this Button really should be a Popover, you actually have to go up to here and choose Popover Button and Make New Button and now it’ll be a Popover Button.

When you do make a new button object, you’ll always have that Pilot. It can just be an icon of some sort, it can be an icon with text, or it can be an icon with text on one side or the other. In this case, we’re just going to use text. I’m not going to get into icons and their usage yet. One of the other main differences between Buttons and Button Bars is that while a Button has four states – normal, hover, pressed and in-focus, and button bars have active, inactive, hover, pressed and in-focus. Active means you’ve pressed it.

When you double-click to edit this button bar, you’ll notice that you have to choose one segment to be active. This would normally be used for like a navigation bar, so, in this case, if we imagine that this is a navigation bar, we go back into Browse Mode. We’re on the People layout, so when you click People, nothing’s supposed to happen. I want to go to Invoices. Click on that and now you have a similar Button Bar, only in that one the active button is the Invoices button, because now you’re on a different screen. That’s typically what the active state would be used for.

If you’re not using this as a navbar, and just using it to run scripts, you probably don’t want to have an active state. In that case, go to the active state and design it to look like the other states, so there is no active state. The other main difference between Buttons and Button Bars is the text that you can have on a Button Bar. This is one of the Button Bar’s strengths. When you double-click, you can use the full power of the calculation engine to calculate anything. For example, put a function like Get Current Date. That Button Bar will have the date as the label, or I can have a field – let’s say it’s the Full Name field, and anything else you could do with the calculation engine you can put here.

You can use merge text on a Button Bar, which is what I’ve done here. You can insert anything you want into a merge field or merge variables. You can actually place this in the label of the Button Bar, but that’s about all you can do with calculated text. The main difference is if you put a variable in and merge that variable, you’d have to run a script to create that variable, and then refresh the screen before you actually see the label. The Button Bar, however, will dynamically calculate that every time you refresh the screen. In fact, anytime data changes, the label on your Button Bar will change. It’s a very powerful feature.

One of the other key features of Button Bars is if you want to make one of these buttons invisible, use Hide Object. We’ll just say True for now, which means that this is going to be invisible when I go back in the Browse Mode. Now you’ve got a gap where there used to be a Button, and now there’s no Button. If I wanted to make this Button segment invisible on a Button Bar, I would hit True and I go into Browse Mode. Now we see that the segment disappears, but the length of the button bar actually stays the same and fills in the gap. On any given screen you can have inversely hidden objects, where one is invisible and the other is not visible.You can actually have multiple Button segments doing different things, and make certain ones invisible when some condition exists so that becomes a really powerful tool as well.

Another cool thing about Button Bars is if you click and hold on a segment in a Button Bar, you can actually drag it around. You can actually delete segment just by hitting the Delete key. If I hit Command C or Control C on the Windows, I’ve copied this segment and I can paste the segment. Now I’ve got a whole new button bar! If I wanted to add a new segment, I can just click Plus.

The final powerful feature of Button Bars is using dynamic text for a layout. I often use Button Bars solely because they have dynamically calculated text. Perhaps I wanted to show some text on the layout that was supposed to be not editable, and to calculate something dynamically as well. What I might do is actually take this style, choose one that’s invisible, so you can see when I click off it just looks like text sitting on the screen, but it’s actually a Button Bar. If I double click this, and I have nothing attached to it, no script steps no scripts, now they won’t have a hover state – it won’t change. When I hover over it, it’s got nothing to do and nowhere to go – it’s now essentially just a piece of calculated text. I might make the alignment to the left and oriented towards the top left, and now if I go into here and calculate the text, I might put sales and this person and paragraph, and I can put this display text. When I go back into Layout Mode, I can see now this is just calculated text essentially displayed on the layout. When we go into Browse Mode, it just looks like text. You can’t select it, you can’t accidentally edit it – it’s fixed text, and you anything that you can calculate can be placed on a layout in a Button Bar segment. That’s not actually a Button because it doesn’t do anything, it’s just used for the calculation engine. This is a super useful feature of Button Bars and I use it all the time.

We can see this calculated value because I have a setting in FileMaker under the View Menu that says Show Sample Data. If you don’t, the default setting for FileMaker is to not show sample data, so when you make this a calculation in Layout Mode, you can’t actually see what it’s calculating. When you go into Show Sample Data, it’ll now show you what it’s calculating. This is the same for fields. Say we have this Full Name field on the layout – when we view sample data you’ll actually see the data that’s in the field. If I turn off sample data now I see the Field Name. Most people using FileMaker will design their layouts with field names so that the Button Bars just say Calculation, but I frequently switch to Sample Data, so that I can see what’s being calculated in Layout Mode.

That’s about it for Button Bars and Buttons. I find Button Bars super useful – I use them all the time. You may find that you there are certain strengths of regular Buttons and certain strengths of Button Bars. I would encourage you to a comment down below and let us know which one you prefer, and any special techniques you found with one or the other.

Lesson 9: Case Function

We’ll show you how to write a calculation using one of FileMaker’s most useful and commonly used functions, called a case. A case statement is used to run a series of tests, returning a different result for each one depending on whether or not the test result is false.

A perfect example of this is setting a priority based off of due date. If the due date is today, for instance, you might make the priority Critical. If it’s due tomorrow, the priority level would be High.

Let’s use the data viewer to write a calculation. Start a new expression. We’ll begin by using the function called case. The first parameter that the case function requires is the test itself. We’re going to check the task due date and see if it is today. The next parameter will be the result if this test returns true. We’re going to make this “critical.” We could stop here and offer in a result if this returns false, or we could continue with a series of tests.

Next we’ll check to see if the task due date is within the next three days. We’ll see if the due date is greater than today and less than or equal to the get(CurrentDate) plus an extra three days. If this is true, then we’re going to return a result of High priority. Next we’re going to see if the due date is due any time within the next week. For that we will check if due date is greater than the current date and less than or equal to the get(CurrentDate) plus an extra 7 days. If that is true, we’re going to return a result of Medium priority. As a backup, when all else fails, everything returns false, we will return the result of Low priority. We’ll close out of our function with a parenthese.

One important thing to note is that the order in which you write these is very import. FileMaker will process these requests sequentially and return the first true result that it finds, meaning if the medium priority line had been written first, then it would’ve been the first true statement, and we would’ve gotten a result of Medium, even though the result we really were looking for was High. Just make sure, when writing your calculations, that you account for this workflow and write them accordingly.

Lesson 10: Anchor Buoy pt. 1

Hi, this is Matt with AppWorks and today’s video is going to be about Anchor Buoy, and comparing and contrasting that with the Spider Graph. What we’re really talking about is the approach within the relationship graph of having a spider graph, where you have one large structure with everything next to everything.

This other approach is Anchor Buoy, with table occurrence groups, where each set of table occurrences are disconnected from each other, and there’s a really consistent naming approach where its really easy to select something.

Why would you do that? Here’s an example. On the example Spider Graph database, where I want to add the phone number of someone who works in this organization, I’ll grab a number and put it on the graph. Grab the field called Phone, exit the layout, and it shows the same phone number for everybody. At a glance, I wouldn’t know that this is wrong, but if I change the phone number, everybody’s phone number changes. This looks like its right, but it’s actually not right, because that’s an invalid relationship for what I’m trying to get to. It’s really hard to know that because I have to go to the graph to research.

Let’s talk about Anchor Buoy – let’s try that same approach. Go to layout, add a field, put it on the layout. Here I have really consistent naming. If I look at my structure, the first thing I notice is I have related tables which is a small set – I don’t have every single thing. All the tables down here are unrelated – I could use them, but I won’t. I have a really consistent naming convention, where I have Company_Employee and Company_Employee_Phone. I’ll pull Company_Employee_Phone down, and I’ll see that the phone numbers are actually different. This is why Anchor Buoy is a really valuable tool and why it’ll save you a huge amount of time in most of your FileMaker databases. In the next video, I’ll talk more about the naming conventions and some of the more subtle points for how to do this.

Lesson 11: Anchor Buoy pt. 2

Hi, this is Matt with AppWorks and this is part 2 of the Anchor Buoy series, which will focus more on how to do it.

In this example, let’s say we’re going to add a Notes table to this CRM solution that we have here. So, if I take a look at the graph, I’ve already added the table, which is over here. There are 2 things I want to touch on – we talked in the other video how we only ever make a layout based on the leftmost occurrence. When I made this table, it automatically created a layout for it. I might want to have other things that hang off of note over time, like an audit log or something like that. The first occurrence is going to be the head of its own table occurrence group. I’m going to Option Drag it to make a copy, and connect it to Company. The way that I do this relationship – grab any 2 fields, hit Command O (Control O on a Windows), which opens up the edit relationship dialog. I find this much more useful to connect the fields together for the relationship than to try and do it on the little tiny graph by dragging the right field. This is going to be Company → ID to ID_Company. I’ll click change and accept that.

The next part is really important – it’s the naming conventions. If I just went to my layout now and tried to add a portal, it’s going to come up with my portal dialog – I don’t know if it’s Note 2, or which. That’s the only one that shows up – it’s not very clear looking at the graph what my naming convention is. I’ll go back to the graph and take a look at how I’ve done these other ones. The underscore character in a table occurrence has a very specific meaning – it means there’s a relationship here. If I take a look, I’ve got Company to Company_Employee to Company_Employee_Phone.

Every underscore only means one thing – that’s a relationship. In the more formalized approach, sometimes what I do is give a code – so, for example, I would call this one C__Company (double underscore). The double underscore is the head – after that I just use the single underscore and everything after that is the group. I’ll convert this table – it’s a fast thing to do. This makes the names shorter, so if you have a lot of relationships, having that shorter code is definitely nice. The thing we have in the middle – the right-most word is generally the name of the table that it is referring to. This is the employee table, sales rep table, etc.

In this case, the employee and sales rep table are both connected to the person table – they are two different instances of a person. The Note table, if I double-click, C_Note. I see crossing lines – crossing lines drives me crazy, so I’ll drag my tables so that this doesn’t happen.

Now I have my graph working! If I click Ok to save this, I’ll see if I add a portal, that it’ll be very clearly named, so I can see that my top table is here and all my related fields are underneath. If I choose C_Note and click ok, I’ll see fields on the left that I can start adding in. I can choose the specific fields that I want, which will be C_Note::Date, C_Note::Note and C_Note::IsDone, which is a field I use to track if a note is complete or not. Click ok.

I also can’t make a new record – I’ll go to my graph and fix one thing. That is to click the box on the right column on the bottom that says Allow creation of records in this table via this relationship. I don’t really ever click this on the leftmost column, and I very rarely ever click on the fields to Delete or Sort. Now I should be able to create records with notes. I’ve completed adding a portal, I’ve added labels, and shown an easy way that you can use Anchor Buoy in your solutions.

Lesson 12: Subsummary Parts

Hi this is David at AppWorks. This video is going to go over subsummary parts. Subsummary parts are basically a way to group records, typically in a list view, so say you have a list of records and you want to sort them the normal way. You can sort by status, say, if I hit sort it just puts them in alphabetical order. If I click sort by priority it just sorts it by alphabetical order but it doesn’t really group them in a way that is easy to see, so subsummaries come in really handy when you want to group something.

The way that you make them by going into layout mode and you go insert part and instead of choosing a navigation or header you choose a subsummary part. Subsummaries only appear visible on the screen after you’ve sorted by a specific field. For example, if we want to have a subsummary part where we group our list view by status. We choose that field and you can set some other settings here – usually where the page breaks will occur, things like that, but for now we don’t have to worry about that. You can choose printed below or above.

The subsummary can usually have a name of the grouping, like we might put the name of the status in that subsummary part so that we can see that this section of records will be such-and-such status and the next section is a different status. In that case we might want to put it above our group of records, but in some cases you want to put the subsummary below the group of records. For example, if you want to summarize a total – if you have a summary field in your table you can total up the net of, say, money in that group of records and stick that in the substrate field.

For now we’re going to say print above, because we’re going to make a heading essentially by status. If you take the status field, now we’ve got this subsummary part here. If you double click on this, you can see it’s sorted by status. Let’s cancel that, because we’re going to take a field and stick it right there. Leave that status field right there. Let’s get rid of this heading and let’s make it actually a larger point size. Choose 18 point minimal, and let’s make it bold as well. Now when we sort this list of records by status, this subsummary part will show up.

If we go back into browse mode and we’re sorted by priority, we’ve got sorted alphabetically by priority. That’s not that useful. We sort it by status now we’re going to suddenly see these subsummary parts show up. We’ve got approved – these are the records that are approved, these are the records that are awaiting approval, these are the ones that are cancelled, these are the ones that are done. It’s a really nice and easy way to sort and group records.

You can actually have more than one subsummary part, so if we go and search another part, we choose subsummary again and this time we choose priority. Let’s take this and we’ll just duplicate it over on this other subsummary, which is sorted by priority and instead of status we want to put the priority field in- get rid of that label. Now when we go back into browse mode, notice we still have our sorted by status grouping subsummaries. If we just look by name that’s going to make these summary parts disappear – now we see no subsummaries. If we sort by priority, you’ll notice that we now have a new subsummary part that’s by priority – high priority, low priority and medium priority. Choose status again – it changes the sort order and changes the subsummary part that we are able to see. Now we’ve got two different groupings.

A cool additional feature of subsummaries is that you can actually have more than one subsummary showing at once. Say we wanted to see the status groupings, and then also the priority within the status. Go into layout mode and let’s just change priority to slightly indented and we’re going to change it to a gray color. Now if we go to browse mode and we sort by status, we see this. if we go however by status and by priority – first by status and then by priority, we’ll see that we have two subsummaries showing approved at low priority, we’ve got a waiting approval, some are high priority, one is low priority. Here we’ve got cancelled low priority and medium priority. You can see actually two separate subsummary parts grouped by as many subsummary parts, and sort orders as you’d like, so that’s a pretty simple way to make a nice report.

You can actually have the same layout be repurposed for different reports just based on the way that you sort it and which summary parts you include.

One last part that you’ll want to know about for subsummaries is how to actually summarize data in one of these parts. We would go to manage database which is here, and we’ll look at the fields and let’s see if there’s actually a sum of the total estimated hours. This is a summary field so there’s a field called estimated hours and it’s just a number field. We can have a summary field that refers to that, and summarizes the data in the estimated hours field if we place that field on here.

First swap out this field – let’s put the estimated hours field on here. There’s estimated hours – we’ll put that up there and we’ll make that text white so we can see it. Now let’s put a summary part in here. In this case we’re going to add a new part – another subsummary, and this time it’s going to be summarized by status again, so instead of making this subsummary part show above we’re going to make it print below.

Now you can see that we’ve got the status subsummary part up here, and another status subsummary part down here. Our groupings will have two subsummary parts – one by status and one underneath in which we’re going to put the summarized total number of hours. If we copy this over and we choose the summary, so only summary fields work this way, if you put a summary field in a subsummary part it will summarize the data in that group above it or below it.

Now when we go back to browse mode and we sort by status you’ll notice that we’ve got some hours here – this one has four hours, and this one is going to be three hours estimated. Now you see the summary is seven hours here. We have say one hour, two hours, three hours, and so on and so forth, and now the summarized data is in that some report. You can use this for dollar amounts if you want to summarize the total for a group of purchases, say, or invoices. It’s pretty straightforward.

You can actually add one more part if you want – in the footer, you can actually add this summary field and summarize all of the records, so here at the bottom you can actually see that this summary is a total of 50.5 hours for all of these records that are showing. Each subsummary part only summarizes the records within a subsummary, so it’s basically a super handy way to make real quick reports that can be very flexible. You can make one layout function for multiple different kinds of reports. I use it all the time and I’m sure you will, too! Thanks for watching, subscribe to our channel, and we’ll see you later!