Writing Complex FileMaker Calculations

When you’re faced with creating a complex piece of FileMaker code, you often break the larger problem into smaller parts. It’s always easier to tackle smaller portions of a larger problem. Even when it doesn’t seem like the problem should be that big.

In this video, you’ll discover a lot of good information about how to break a larger problem down into its smaller parts. The problem being solved is extracting all the individual pieces of a US mailing address. There are so many various methods of composing a US address. So, writing a parser in FileMaker specific calculation code can be an interesting challenge.

The video focuses on finding resources and code you can leverage and then integrating that existing code into your own FileMaker code. If you find that learning how to write better FileMaker calculations is something you’ve always been after then this video will have what you need - and more! It’s even got information about testing your FileMaker code to ensure it’s validated and comprehensive.

Tags:
AttachmentSize
ParseUSAddresses.zip97.75 KB

Pill Menu Button Bars

I can’t recall a situation where some technology from the past isn’t superseded by the new technology which replaces it. In the context of FileMaker Pro, a good example of this is your basic button.

Yes, it’s been there ever since FileMaker was created. There never was a FileMaker Pro without the button widget. Enter FileMaker 14 and Button Bars and we now have a lot of possible options. Especially when you combine the Hide object calc which arrived in FileMaker 13. You can control which segments are shown and take advantage of this is various other ways.

In this video, I show you how to make a few minor tweaks to a default Button Bar object in order to streamline one of the available FileMaker templates. It’s a great exercise in optimizing your layouts so you don’t have to copy/paste and manage as many different layout objects. You get all the same results with some added benefits provided by the Button Bar layout widget. If you’ve got a lot of layouts with a lot of buttons all aligned in a row, then this video may have a nice little trick or two when making your design considerations.

Tags:
UI
AttachmentSize
SnippetEditor.zip79.6 KB

Real Time Image Cropping

[UPDATE] Because FileMaker has updated security and privileges, you need to enable the Privilege setting of Allow URLs to run FileMaker scripts (fmurlscript) in order for this technique to work. Also note that it's now possible to modify this technique such that urls are not required. You can use the bidirectional feature of Web Viewers to execute the JavaScript. This requires enabling the setting of Allow JavaScript to perform FileMaker scripts which is a setting on each individual web viewer object.

Original post

FileMaker Pro is always advancing its collection of tools in order to accomplish more and more every day tasks. It provides default widgets such as tab panels and sliders and offers useful functions such as GetThumbnail() for resizing images.

GetThumbnail, however, will only get you so far. It will only resize an image to another size and provides no functionality regarding the manipulation of that image in any other way. This is where you need to turn to either a plug-in or JavaScript within a Web Viewer.

With a plug-in, you’re limited in terms of what you can do within the FileMaker client on mobile devices. FileMaker Go doesn’t support plug-ins. With a web viewer, you can take full advantage of the JavaScript engine embedded within the browser.

In this video, I show you how to integrate and use a freely available and very powerful javascript library called Cropper.js. If your goal is to provide an easy-to-use cropping feature within your FileMaker solution, then you won’t find a quicker result than simply copying from the provided file!

Tags:
AttachmentSize
RealTimeImageCropping2.zip2.02 MB

Keyboard Modifiers & Keys

Because it's so easy to start a database within FileMaker, it's way to easy to gloss over the power features underneath the surface.

I would imagine some developers may never even touch the OnObjectKeystroke and OnLayoutKeystroke events and still make use of a great FileMaker database.

The trick to taking advantage of some of these power features is making them easy to implement.

Who remembers what all the numeric values are for the myriad of Get () functions? You may often have to look things up and this takes time.

On the other hand, having just a few helpful custom functions can make it MUCH more enjoyable to add in new, and useful, features.

This video will help you get started with, or enhance, your use of the above mentioned trigger events.

Tags:
AttachmentSize
KeyboardModifiers.zip65.54 KB

Auto-Enter Examples - Stuff you need to know

One of the more comfortable concepts within FileMaker is the pervasive calculation dialog box. Once you're familiar, you find it everywhere. It can be used with fields and your database schema, and it's used within the processing and logic of your scripts.

When it comes to schema, and what your fields can do, the calculation dialog box is right there with its handy Auto-Enter options.

This powerful feature allows you to do all kinds of magic with fields. A field can determine what it should become or change into when other fields are changed. It can tie into your whole solution and make evaluations based on a myriad of various conditions.

There are certainly some fundamentals to know about Auto-Enter options and how they work. Every FileMaker developer should know these. Also, knowing just a few of the helpful functions can take you a long way in accomplishing your desired goals with FileMaker.

This video provides information about using auto-enter to manage record duplications when using a UUID.

Tags:
AttachmentSize
AutoEnterExamples.zip67.6 KB

Automated Spell Checking

Spell checking seems like one of those subtle little afterthoughts. You either know you need it or it almost doesn't exist. But, of course, it's always there. This isn't how it used to be. It used to be that you had to check everything manually if you wanted to catch those typos.

With the OS picking up a bunch of the work in the last decade, pretty much any application can simply show which words are misspelled. This is the familiar red-dotted, or some other color, underline we now see when a word is misspelled.

While this particular feature, in FileMaker, can be turned on or off at both the field level and the file level, it doesn't cover all the new words and terms which inevitably show up as we move forward through time.

If you have any type of need which may benefit from the custom dictionary then watching this video will help provide some insight into making things work much more smoothly. At least when it comes to spell checking the content in your database fields.

With our work lives becoming a bit more distributed, this particular technique may be quite helpful to those with industry heavy specific jargon!

Tags:
AttachmentSize
AutomatedSpellChecking.zip62.14 KB

Dynamic Image Thumbnails

What's the easiest way to display images within your FileMaker solution?

Did you answer with a container field? Sure!

Now, did you answer with the "same" container field which stores the image?

Maybe not.

In fact, probably not. The right answer, however, in most all situations is typically "it depends", but we're going to walk through the knowledge necessary to optimize your database for the best performance when it comes to image display.

You often find tradeoffs when it comes to storing and displaying data. You either store once and render in multiple sizes or you store multiple sizes and render once.

The key is knowing what's going on behind the scenes. Knowing what's being transferred and when and how FileMaker provides support for this in order to make your database as efficient as possible!

Tags:
AttachmentSize
DynamicThumbnails.zip49.9 KB

Leveraging HTML Frameworks

I think I may be right in assuming one of the most under utilized features of FileMaker is the web viewer. Not because it's hard. Rather, because it's a hassle.

When you're using a web viewer for the display of data, you must to be comfortable with knowing a bit of HTML, as well as CSS, in order to achieve the desired look.

Unlike native FileMaker, it's not like selecting a piece of text in Layout mode and simply making it bold and changing the font and color.

The big advantage, however, is the degree of control and interactivity you can exercise within a web viewer.

Not surprisingly, a good percentage of native iOS apps are compiled from the web viewer familiar features of HTML and CSS. If taking advantage of the web viewer is something you've been avoiding, then bypass the hassle of hand crafting your own CSS and go for an existing framework.

Using Twitter's Bootstrap, I show you how easy it is to integrate a very attractive kind of output using web viewers. You can easily integrate into your own FileMaker files in record time!

AttachmentSize
HTMLFrameworkLeverage.zip121.5 KB

Portal Row Indicators

Sometimes it's the simple things that make you smile. When I first started using the trusty little diamond character, I was so pleased with myself - despite its lack of complexity. The old way of accomplishing things in the user interface typically involved using a container field with some image in order to make your interface look halfway decent.

Nowadays, you can find a lot of use in the vector based characters of fonts. On the web it's all the rage. They even have automated custom font builders which include various icons. Hopefully, some day, FileMaker will support embedding a font file into a FileMaker file and being able to use that within your solution.

Until that happens, we have to be content with the base set of fonts provided by the OS. There's still a lot there however.

This video is all about taking advantage of those little features like the diamond character. Combined with a little secret knowledge about how portals and tab controls work, and you can whip up a creative little interface!

AttachmentSize
PortalRowIndicators.zip54.89 KB

Virtual List: Expanding Portal Rows

The Virtual List technique, as it's come to be known, has been possible since the introduction of global variables with FileMaker 8. It wasn't widely known or used until Bruce Robertson started promoting its use in ways which were previously not envisioned. It can be used for more flexible printed output or showing information from multiple tables within one single portal or list view.

Essentially, you populate the contents of a $$global variable in some fashion and then parse that data into some viewable form - "on the fly" as they say.

The most common method of using this technique is to simply extract each line within the global variable using the GetValue() and Get ( RecordNumber ) functions. What makes it so powerful is the fact that the global variable can hold any data from any number of sources. This means you can mix-n-match to your heart's content.

How you get the data into the global variable can be managed in a variety of ways. Record loops, ExecuteSQL() function or even the overlooked Copy All Records script step.

In this video I showcase a technique which allows for individual portal rows to be expanded and hidden as necessary. This allows for a wide range of display possibilities. Each row can vary how it is presented using conditional formatting and the whole solution is just a great way to control how users interact with data.

AttachmentSize
VirtualListExpandingPortalRows.zip79.27 KB

Pages