Level: Intermediate, Version: FM 12 or later

Extending FileMaker’s PDF capabilities with PDFtk Server

One of the great things about FileMaker is its ability to not only create a PDF from a single “print job”, but to take a series of separate jobs and concatenate them into a PDF via the “Save Records As PDF [append]” feature, like so:

7-13-2014 2-20-22 PM

(The above code comes from PDF Catalog with Table of Contents, which appeared on this site last year.) Basically, anything you can print from FileMaker, you can instead output as a PDF.

But what if you have existing multipage PDFs stored in container fields, and want to combine them into a larger PDF? This is something FileMaker cannot do natively. Recently I had a need to do just this, and happened to mention it to Jon Rosen at ErgoSoma, who suggested I take a look at a cross-platform utility called PDFtk Server.

7-15-2014 8-23-53 AM Continue reading “Extending FileMaker’s PDF capabilities with PDFtk Server”

Level: Intermediate, Version: FM 12 or later

Process Lock that Clears Itself

If you build multi-user business systems, you may have had a need at one time or another to temporarily “lock” a process, so that only one user at a time can perform it. A typical drawback to most process locking approaches is that the lock does not automatically clear if the user who locked the process crashes or otherwise bails out of the system abnormally.

Well, I have some good news: Bob Gossom of Absolute Advantage has come up with a very clever, and well-documented, self-clearing process lock technique, which I’m pleased to share here with his permission.

6-24-2014 2-33-36 AM

Continue reading “Process Lock that Clears Itself”

Level: Beginner, Version: FM 12 or later

Show/Hide Formatting Bar

Note: A special thanks to Jason DeLooze for sharing this technique, which neatly remedies a small, but vexing, annoyance.

Demo file: Show-Hide-Formatting-Bar.zip

6-13-2014 10-04-55 PM

Have you ever wanted to have a script toggle the Formatting Bar on/off in browse mode? If so, you will discover that FileMaker does not provide a “Show/Hide Formatting Bar” script step.

Continue reading “Show/Hide Formatting Bar”

Level: Any, Version: FM 12 or later

Unicode

Update 5 May 2014: article and demo have been updated as per observations by Jeremy Bante in the comments section.

This weekend I threw together a Unicode utility file (unicode-characters.zip). It takes the values 1 through 65535 and converts them into Unicode symbols, and makes it easy to copy characters and values into the clipboard.

5-5-2014 12-10-29 PM

(The original version of the demo had 99999 records, but as pointed out by Jeremy in the comments section below, the range 65537 – 99999 is a repeat of the range 1 – 34463, with 65536 being a special case.)

Any value over 99999 the Char function will interpret as multiple characters, and bear in mind that multiple values are interpreted a) from right to left, and b) in five digit blocks with leading zeros, except the leftmost one will not have leading zeros.

Continue reading “Unicode”

Level: Intermediate, Version: FM 12 or later

Generating Sample Data

Have you ever wanted to generate sample data for one of your solutions that was random in certain ways, but within a defined range or scope? For example, assuming an invoicing solution with existing tables of customers and products…

  • choose 20 customers at random
  • create between 4 and 8 invoices for each of them
  • dated anywhere between 1 September and 31 December 2013
  • choose products at random
  • from the subset of products where price is between $30 and $50
  • create between 5 and 25 line items per invoice
  • with a quantity for each line item between 1 and 24

Wouldn’t it be nice to wave a magic wand to solve challenges like this? Well, I have some good news: Jesse Antunes and Geoff Coffey made that magic wand available, in the form of a custom function, back in 2007 on the SixFriedRice blog (Creating Random Numbers in FileMaker)… but I confess that I didn’t really grasp how useful it could be till Beverly Voth mentioned it in her article on Aggregates in Filtered Portals.

12-31-2013 2-24-17 PM

Level: Intermediate, Version: FM 12 or later

It’s Sorta a Value List Thing

Editor’s note: Today it’s my privilege to present an informative guest article written by Jonathan Fletcher on the elusive topic of sorted dynamic value lists. Jonathan is a well-regarded, thoughtful and thought-provoking fixture in the FileMaker community, known for his generous and frequent contributions to various online FileMaker forums.

Have you ever had a need for a value list that displayed a generated list of years in descending order? Have you ever had a client ask for a popup of dynamic characteristics or statuses in the order they are most often employed by the users?

1386121790383

Continue reading “It’s Sorta a Value List Thing”

Level: Intermediate, Version: FM 12 or later

Tab Panels: Seen, Unseen and Simulated

Last time we examined some of the nuances of tab controls, both visible and invisible. Today we’re going to extend the exploration to include simulated and, in demo 5, genuine tab interfaces for layout navigation.

1386121787023

Today’s demo files:

Continue reading “Tab Panels: Seen, Unseen and Simulated”

Level: Intermediate, Version: FM 12 or later

Conditional Tab Panel Access

Challenge: in a system with three privilege sets, Employee, Manager and Administrator, you want to control access to various panels on this tab control like so:

  • Employees have access to tabs 1,2,3
  • Managers have access to tabs 1,2,3,4,5
  • Administrators and Developers have unrestricted access

1386121781660

As usual in the FileMaker world, there are various approaches you could take, and today we’re going to look at three of them with the help of these demos: Continue reading “Conditional Tab Panel Access”

Level: Intermediate, Version: FM 12 or later

Benford’s Law

A common exercise in freshman courses on statistics and probability is to divide the students into two groups, let’s call them A and B.

8-11-2013 9-39-15 PMEach student in group A is instructed to flip a coin 100 times and record the resulting sequence of heads and tails. Each student in group B is instructed to merely pretend to have done so, and write down the fictional sequence. The sequences are submitted anonymously to the professor, but invariably the professor correctly determines which group they belong to.

Take a look at the example at right. If you were the professor would you assume it comes from group A or from group B? Would it strike you as suspicious that the first six tosses alternate between T and H with perfect regularity, or that starting with toss 12, there are five H’s in a row?

Continue reading “Benford’s Law”

Level: Intermediate, Version: FM 12 or later

PDF Catalog with Table of Contents

Recently I was asked by a client whether we could produce a PDF catalog from his company’s database, with products grouped by manufacturer. Me: “Of course, this is FileMaker.” Him: “Can it have a table of contents?” Me: “Yeah, sure, no problem.”

Actually, it took some trial and error, but we got there eventually…

7-13-2013 4-36-23 PM

Continue reading “PDF Catalog with Table of Contents”