FileMaker’s innovative platform requires ever more security as the platform’s transition to a First Class Web Citizen continues. As more services connect to our systems and as more people interact with the data, a file needs tighter and more security. FileMaker 18 has introduced changes that increase security, remove false security, and open up more security access to authorized users.  Those changes include Enabling “Require Full Access Privileges to use references to this file” by default, removing false security of password challenge for full-access, alerting the developer to unsigned plugins, and adding a new option to allow non-full access users to manage non-full access accounts.

Let’s take a look at the FileMaker 18 security changes that have been introduced.

A new security interface

For one, the security interface has been redesigned to be more efficient for a developer or user coming to adjust the security settings.

FileMaker 18's redesigned security interface

FileMaker 18’s redesigned security interface

Those people who are assigned the role (more on that later) can adjust the privilege set, enable or disable it, or set/reset the password. This redesign seems to solve the “number of clicks” problem. The developer or a user can do what they need to do in fewer of them.

A Privilege to manage user accounts

As clients become more used to manage their own day-to-day security, they expect more control over accounts and such. As a developer we can provide scripts to do some of this, but that is a pain. FileMaker 18 adds a new privilege for any non-full-access account to manage non-full-access accounts.

The new privilege to manage non full-access accounts

The new privilege to manage non full-access accounts

A user with this privilege can do what we as developers used to have to do manually or build scripts. She can add accounts, change privilege sets (but not create them), change passwords, and more. If the same user has the older “Manage Extended Privileges” privilege, then she has more control over user accounts.

This person cannot touch the full-access accounts in the file. Though she can see them, she cannot edit or delete them.

Require Full Access privileges

This is sort of a feature that’s been around for a long time but sort of been hidden and off by default. For those files created with FileMaker Pro Advanced 18, this setting is now on at file-creation. This is a good thing.

The Require Full access privileges is activated by default.

This feature ensures that only authorized files can access this file, and that authorization can only be given by the full-access account of the file. If File A has this option turned on, then File B can only reference this file after File A’s full-access username and password has been entered when setting up the reference.

This feature is off by default for files created with FileMaker Pro 17 Advanced and earlier. But it’s easy to set up. Simply navigate to the Authorization area, turn it on. Then you have to go to all files that reference this one and authorize it.

I find this feature amazing. So we’ll talk about it in the near future.

Removing password challenges (most of them) in Manage Security

A FileMaker developer’s job is to deliver to the client an innovative app that connects to other services, processes data, and displays summaries, among other things. We’re logged into the file using our full-access account for a work session, opening the script workspace, the custom function dialog and other places. In previous versions of FileMaker the Manage Security dialog was hidden behind a full-access credentials challenge. So we stop our work and enter those. We make changes in the security, then close the dialog. We’re challenged again with credentials.

And then we walk away from our computer to get coffee or a donut or something. Our computer is open and we’re still logged in.

In the past, we might not have thought about that too much. After all, no one can get into the security part of the file. That seemed like it was a security feature.

Why remove

The credentials challenge created a false-sense of security. For sure, Manage Security is one important part of the system, but it’s one part. Any full-access account can still create scripts that create accounts, run any script, delete records, see any layout. etc.  So the password challenge was not much of a security point. It was a work-break point. I am the developer with full access. I need to get everywhere in the system quickly. Now I can.

Challenge accepted

The only time we are challenged with full-account username and password is when we are trying to change that password of the full access account. FileMaker wants to make sure you know what the new password is.

Be thoughtful in security

What we have to do as developers is think security in every part of our work: from our work to the times we’re not working. At the very least, when we walk away, we should log out of the file. Even better: lock the computer.

Again, this is a topic for a later post.

Invalidated plugin warning

The FileMaker 18 security changes include a warning when plugins are invalid in some way: the plugin is unsigned or has expired or other forms of validation fails. The user will get a weird (to them) message when the file tries to use an invalid plugin.

Since FileMaker now does this, we as developers should plan for this. We should use only valid or signed plugins, and we should test to make sure that users won’t get this message.

Luckily we have a small group of those plugins, and all the developers are part of the community, so I’m sure they’re working on getting this fixed. I doubt any plugins we typically use will cause this error.

FileMaker 18 security changes

FileMaker’s security changes show us that FileMaker, Inc. is indeed concerned about security. Every release continues the security updates as the platform reaches further and further out from our local computers and touches more people. The changes introduced in FileMaker 18 are necessary and good. They tighten up security and make our delivery to our clients more efficient and neater.

FileMaker 18 is another important step for the FileMaker Workplace Innovation Platform. It has a nice collection of new capabilities and features that make our jobs as Workplace Innovators even easier. But I like to take these now-yearly releases as an opportunity to step back, look at the bigger picture and fit this release into the broader trends that I see both inside FileMaker, the community and in Workplace Innovation in general.

The Beginning

Two years ago I wrote about how important FileMaker 16 was. I called it the Biggest Change Since FileMaker 7.  We got full cURL support, JSON parsing functions, a REST API and lots of others features that enabled FileMaker to become a first class citizen of the world wide web. It is hard to imagine being able to build apps today without access to those features.  But it was really only the very beginning of what was to become a major transition for FileMaker and the community. We are now well into that transition. In fact I’d say we have reached “The End of the Beginning”

Since FileMaker 16 shipped, several important things have happened or will be happening later this year. They show a company and a community that is more focused than ever and is fully engaged in strategy that I believe has a high chance of success.  Certainly there are challenges, more on this below.  But we are coming out of the awkward 🙂 beginning stage.

First Class Web Citizen

New features are great and individual companies and users can adopt them as soon as they are available.  But practically speaking the ecosystem as a whole is working with an average of the versions that are currently supported. There are still a lot of people using FileMaker 15, which does not support cURL and JSON.  Therefore the whole ecosystem doesn’t get to assume they can use JSON or any other feature in 3rd party products or sharable code, without excluding some portion of the ecosystem players.

Later this year FileMaker 15 will drop out of FileMaker, Inc.’s list of supported versions. All supported versions of the FileMaker Workplace Innovation Platform will be first class citizens of the web, able to integrate with just about any service, API, or app out there.

Modern Cloud Server

FileMaker 18 Server is the first version that has been built with core support for using multiple processors. While some of the benefits of this will take some time become obvious, we need to recognize how important this is.  Re-writing a database engine for a new feature like this is not easy. It’s not like just adding a new script step or a new layout control.  It is messing with a database’s highly optimized core job of writing data to disk correctly.

This had to get done for FileMaker to move fully into the cloud. We now have a server that has the required technical foundations to function as a cloud service or a on-prem server.

Workplace Innovation Platform

I am now into my 3rd decade developing on top of FileMaker and for the first time, I feel that I am in sync with–and have an essential role in–FileMaker’s strategy. FileMaker is and always has been a Workplace Innovation Platform. But there was never a common understanding even within FileMaker, Inc., never mind within the broader community, of what it was. Now there is. The time of figuring out what FileMaker is over, and the time to grow into that category is now in full swing.

We have a new community forum, new hilarious marketing videos, and even a new design on FileMaker front page. The roadmap promises more important changes coming soon. Everything is being shifted and brought into alignment with the new focus on the Workplace Innovation Platform. We even have new changes at the top jobs at FileMaker.

Changes at the Top

Dominique Groupil as CEO kept FileMaker relevant and profitable for two decades, a truly remarkable accomplishment. But even more amazing to me is the fact that he had the foresight to kick off this transformation and make sure it was on the right track before announcing his retirement and turning over the reins to Brad Freitag.

I have had the opportunity to work with Brad on the FBA Partner Council and in various other venues.  He is a good listener. He takes the time to collect and consider many viewpoints before taking action, sometimes bold action. He also has the confidence to course correct when the landscape shifts. In short, I am sure he will do an excellent job in leading the team at FileMaker, and I have high expectations for the years ahead.

The End of the Beginning

The new FileMaker 18 Platform is the world’s leading Workplace Innovation Platform used to help problem solvers address their unique business challenges. It includes great new features for developers to create, share, and integrate custom apps.

It also marks the end of the Beginning of FileMaker’s transformation. We have new features, new marketing strategy even a new management team. The transition is now well underway. Buckle up!

Future Challenges

This all great news. FileMaker needed to rise to the challenge being presented by the market today. In my opinion the challenges that lie ahead have a lot to do with developing the right language to describe what it is that Workplace Innovators have to do everyday. We have a good description of the problems people face trying to use technology to solve problems, and we now have a good set of low level capabilities like cURL, REST, WYSIWYG forms etc. So we know the goal, i.e. where we are trying to go, and we have a good tool that can get us there, but we need to make it even easier for people to pull it off.

Let me put it this way.  In 1995, I could use FileMaker 3 to build a custom information system using the just 6 concepts: Tables, Fields, Layouts, Value Lists, Scripts, and Relationships.  If you understood those six things you could build just about anything you needed at the time.

Today, I have different requirements. Things are lot more complex. I can still do everything I need to do, but it can take a too long to do it myself.  Can we find a way to “compose” new types of objects together so that we can assemble systems faster, using larger teams of people? I am not sure we can ever get back to just needing to know about 6 building blocks. But I believe there is set of modern system design patterns that we can break down, understand and recompose with FileMaker.

For example. Since version 16 FileMaker has had the capability to connect to any API and exchange data. Thats awesome! But once you start down that road you find that it is still a lot of work. We need to make that easier. I say “we” as in we the FileMaker  community and the company. It is up to all of us.

https://www.filemaker.com/learning/devcon/2019/index.html

FileMaker DevCon 2019

I intend to share more thoughts on this topic at the FileMaker DevCon in a couple of months. I am giving two talks on Workplace Innovation Platform. One will be focused on where we are right now. The other presentation will be on where I think we are headed in the next few years.

Also Jeremy Brown is giving a Training Day Session on JavaScript and Geist Interactive is also a conference sponsor. We’ll have an awesome booth. Hope to see you there.

All the best

Todd Geist
CEO, Geist Interactive

The process of actually transacting, of creating or editing or deleting records may seem like a complex concept, but once you understand the idea it’s actually rather simple. We create or edit or delete records from the starting context through the relationships we’ve created. Let’s take a look at the FileMaker transaction process with portals.

Total recall

Let’s remember what we set up as we started the transaction.

  1. We are on a starting context of some kind: either the Estimates table or the DBTransactions-kind of table. In the following explanation, we’ll be on the DBTransactions table, just as Karbon or the FileMaker transaction module in modularfilemaker.com.
  2. There is a relationship between the starting context record and Orders and OrderLineItems Tables set to “Auto Create”. We have named portals set up on the DBTransactions layout,
  3. We’ve collected the data in some manner Either an API request has returned a response or you’ve stored the entire Estimate and estimate line items data in a JSON object. Or the starting context is one that you can grab data from it and related tables.
  4. The current record is owned (thus opened) by the Start Transaction process. There were no errors in creating a new DBTransactions record or opening the Estimate record and its related ones.
    Any log information has been set if applicable.
  5. Oh and I’ve set up the Relationship to look like this. I’m going to store the ID of the Transaction in the order and Order Line table.

Simple & complex

The concept is simple and complex. Records can be created or edited or deleted across the relationship. This is the simple part.

It gets complex when we begin to create the one order and many order line items records in the respective related tables. There’s two ways to do it: in a portal for each relationship (we’ll discuss now) or without a portal (yes, this can be done, and we’ll discuss in the next post).

And now we’re ready to go. Let’s copy the estimate and its lines to Order and its lines.

In this section we’ll talk about creating records. There’s a separate discussion have when we are editing existing records and when we’re deleting records. The concept is the same for all three instances, just a few refined specifics for each.

Our transaction script continues like this (or a separate, “Do Transaction script”, begins):

Step one: create the order record

The first step of the FileMaker transaction process is to create the order record. Simple enough. Navigate to the ‘order’ portal. Go to the portal Row [last] and create that row’s data with data from the JSON object. Set the fields in the related table with data.

Some notes about this:

  • I have only a few fields in the portal. These few are simply to have a visual to confirm the record is created. Any fields will do. You might want to put one data field and any utility fields in the portal for debugging purposes.
  • Once the relationship has been created by setting data in the Portal Row[last], the rest of the record can be filled in with data from the estimate JSON.
  • The moment I create the order record, that record is open. In the Data viewer the Get(RecordOpenCount) is 2: The DBTransactions record and the Order record.

Step 2: Get the order ID

Since our goal in the FileMaker transaction process is to create an order with related order line items, we need to capture the primary key of the order we just created. Nothing’s simpler.

Step 3: Create the order line items

Next we create the order line items through the Order Line Items portal. We have captured the estimate line items previously in the JSON object ( in the “LineItems” attribute), and are ready to parse through it. We do the same thing:

  • Navigate to the Order Line items portal
  • Go to Portal Row[last]
  • Set all the fields in that row with estimate data from one estimate line item
  • Set the foreign key (ID_Order) with the primary key of the order we created above.
  • Continue this process until all data from all elements of the array have been set into the Order Line items table

Some notes:

  • As each order line item record is created, a new record is opened. After creating three line items records, five records are opened:
    • DBTransactions record
    • The Order Record
    • Three Order Line items records
  • We always go to the last row in the portal because it is the place to create a record. Even, as in the Order creation step above, only one record is to be created, we still should go to the Last row. Just keep the process consistent.

Commitment issues

Every time the FileMaker transaction process with portals creates a record in the object, one more record opens up. I’ve made it a point to highlight that fact. We want to keep these records open and we do not want to commit them until the entire record set, the order and all its order line items, have been created. So don’t commit or do anything that commits a record:

  • Do perform a find
  • Click outside a field
  • Commit Record script step

Set let the process run. Let the records build up in memory. And then, when all the records have been created, commit them together as we finish the transaction. Or revert them and NOT create them if there’s an issue somewhere.

FileMaker transaction process with portals

You don’t technically have to use the portals in the FileMaker transaction process. With a few changes, I can do all the work of creating records without a portal.

But portals are a great way for a developer to debug the transaction and watch the process. While running the script debugger, you can watch the records being created (but not committed).

I’m also storing the ID of the transaction in the order and order line item tables. So I can continue to view the records created via the transaction after the transaction has ended.

The FileMaker transaction process, ongoing

In the next post we’ll talk about how FileMaker transaction process without the portals. Stay tuned. It’s pretty cool.

FMPerception’s realtime developer intelligence is essential for developing. We’ve mentioned that many times. But it’s also good for talking with others about systems and about development practice. Let’s listen in on a FileMaker code review run by a MENTOR with her MENTEE using FMPerception.

———-

INT. Day. MENTOR’S computer. She starts up the meeting. MENTEE Joins.

MENTOR: Hello?

MENTEE: Hey there.

MENTOR: How was your weekend?

MENTEE: Oh it was fine. Spent most of the weekend studying for my certification test. It’s coming up soon.

MENTOR: Ah yes. Well we can chat about that if you want later, but first let’s do some FileMaker code review using FMPerception on your latest project.

MENTEE: Sounds good. I look forward to it

FMPerception in a FileMaker code review

MENTOR: This morning I ran a DDR and loaded it into FMPerception to–

MENTEE: When did you run it? I was working on it this morning.

MENTOR: Oh. Ok. Well let me run the DDR again and load it into FMPerception again. Should just take a few moments. In the meantime, I’ll share my screen. There. Can you see my screen?


MENTEE: Yep. Woo. FMPerception already loaded the DDR. That’s pretty quick. It took like five seconds.

MENTOR: It really is. I use this probably twenty times a day to analyze the files I’m working on and look for something like a script or variable or whatever.

MENTEE: Cool. I should use it more.

MENTOR: Yeah. It’s useful for a developer. Okay. So now it’s loaded I want to review a few things with you. First did you have any questions about your file or specific scripts or workflows?

MENTEE: Well I did want to ask about script and layout organization. I’ve not been putting them into folders and wanted to know what you thought about that. And, um, I’m not sure what else.

MENTOR: That’s okay. We will take a look at your folder structure in a bit. Let’s turn to FMPerception and your file.

Report card

MENTOR: In the FMPerception report I pulled up earlier I noticed a few things and wanted to mention those. First, the Report Card for the file shows a lot of good information. This report, as it says next to the name is slow, but the slowness is just a matter of a few more seconds than the rest of FMPerception.

MENTOR: Here it is. What I notice first is that across the top you’ve got 156 unreferenced and 256 broken references. That’s quite a lot. We should probably get those numbers down. Broken refs could disrupt the intended workings of the file, and unreferenced just might be making the file bigger than it needs to be.

MENTEE: That’s a lot of broken references.

MENTOR: Well it could be many things. When I ran the DDR it was missing a few files.

MENTEE: Yah. Those were taken down temporarily while Fred works on those.

MENTOR: Okay. And as I review the broken references details I see a lot of them, about half, are <function missing>. I must not have the plugin. So no big deal. Others, like “Empty Layout Reference” might need some fixing.

MENTEE: Got it. That’s useful. I wouldn’t have known where to find the broken references. FMPerception shows them pretty well.

MENTOR: It looks like some of the scripts are missing all their tables.

MENTEE: Oh yeah. I imported that script and haven’t finished setting up the references. I keep forgetting that I should import the table first, then the script.

MENTOR: Doing that would resolve the links. You could simply delete this script, copy the table from your sample file to this file and then paste the script back in.

MENTEE: I’ll do that.

Global variables

MENTOR: Moving on. I wanted to review your use of variables. You’re using only a handful of global variables. Global variables are fine to use; they just get tough to trace sometimes when they’re set or used in many parts of the file. Luckily we can see the information here and click on any number to take a look at the details. I can click on “Impacted Layout Objects” and see, in your case, the six items that are affected by a global variable.

MENTEE: Should I not be using global variables?

MENTOR: I think it’s fine to use them. Just be aware of them. I wouldn’t use them to store any security-related information, but otherwise they’re fine.

MENTEE: I don’t follow.

MENTOR: Many developers use global variables to store certain privilege information or other settings. If many of the scripts in the same file have logic in them that depends on the values in the global variables, it would be very tough to track all those down. FMPerception shows you everywhere your global variables are used so you can better track those down.

MENTEE: Okay. So use global variables, and use FMPerception to keep tabs on them.

MENTOR: Yep.

MENTEE: Okay.

Standard script steps

MENTOR: I poked around in other areas of your file. The “Standard Scripts Steps” section of FMPerception. What do you notice about this report?

MENTEE: Hmm. You clicked on “Set Variable” of my Clients file. On the right and in the pane below I can see all the times that is used. I can see the details of the step and its script name and even the line number.

MENTOR: What else?

MENTEE: What’s that “Button” designation?

MENTOR: That’s shows every time the Set Variable step is used in a single-step button.

MENTEE: Oh yeah. Wow. That’s cool. I can see here I’ve got three buttons that perform this step. I wonder if I should turn those into scripts…

MENTOR: I would. It’s certainly harder to debug or change these steps.

MENTEE: I’ll get on it.

Single step buttons

MENTOR: You can use the “Single Step Buttons” line on the report card to track down all of the buttons that do a single step and update those. This section shows you: (1) the layout this single-step button it is on, and (2) the coordinates and region it is located. You may want to review the steps beforehand. If many buttons do the same thing, such as “Delete Record/Request” (3), you can create a script that does that one step and assign the script to many buttons. This report shows a lot more buttons that perform single steps. Use it to eventually clean those up.

MENTEE: Got it.

Standard Functions

MENTOR: Moving on. The Standard Functions area is similar in reporting. Here we can see all the uses of each of the standard functions. Like the Standard Steps, this section shows only those functions you’ve used in the file. You can use the Search bar to find any function you’d like.

MENTEE: I like this. Oh. I can use it to look up my uses of ExecuteSQL.

MENTOR: That’s right. You can see the count here, click on the function and see all the places it is used.

ExecuteSQL()

MENTOR: What’s more, FMPerception treats ExecuteSQL specially. This function is a common performance-issue creator, so FMPerception has a special column just for that when you view all the script steps. The dot here in the row indicates this step uses the function. After sorting by the ExecuteSQL() column and all the steps that use this function are sorted to the top, I can look through each one. So far you’ve only used the function one time.

MENTEE: Ah. Interesting. I like using ExecuteSQL.

MENTOR: It’s useful but can cause issues in performance, so use it, but be aware of each use and any implications. And, of course, there are many other ways to get the same result. FMPerception has this separate ExecuteSQL() column in many sections: Scripts (flat), Steps (flat), Layouts (flat), Layout Objects, Table fields, calculations and other places where ExecuteSQL could be used.

MENTEE:  My first DevCon was in 2012.. I clearly remember sitting in the audience by myself and listening to one of the presentations. ExecuteSQL had just been introduced and the presenter was gushing over the fact that he was able to reduce the number of table occurrences by a huge percentage using ExecuteSQL. Everyone applauded. There were gasps.

MENTOR: I remember that. ExecuteSQL is great, but its performance considerations are worthy of thought. In most cases adding a table occurrence and relationship, if you keep the graph organized, is less of a performance impact than using ExecuteSQL in the wrong place. I’m finding I use ExecuteSQL less and less. There are other ways to get the data I need.

MENTEE: I like using ExecuteSQL, but will explore other ways to return lists.

Take a break

MENTOR: Great. Hey. Can we continue in just a few moments? I have to step away. Let’s connect again in 15 minutes. Okay?

MENTEE: Okay. Sounds good. Talk in a few.

END SCENE

Realtime developer intelligence code review

The mentor and mentee took a break. We’ll get back into their conversation in the next post. As you can see in this first half, however, FMPerception is useful in a code review. The conversation centers around objective facts found in the intelligence tool. The mentor can spot bottlenecks or potential issues, and the mentee can use the facts to improve his code.

Let’s get back to the FMPerception FileMaker code review in the next post.

FileMaker Transactions give us the complete tools we need to ensure records are completely created, edited, or deleted. We’ve seen in a previous post the idea behind it. Let’s now take up the idea of starting a FileMaker transaction. Our Karbon framework goes to extensive lengths to start the transaction, but your process can be pretty simple. Check out Karbon or look at the transactions module on modularfilemaker.org. Both are great examples of the entire transaction process.

Starting context

It’s important to get started on the right foot before a transaction begins. We need to begin the transaction from somewhere.

In Karbon and in the Transactions module, we use a DBTransactions table.

It contains fields for logging the transaction’s data, start and end times as well as any information about the success or failure. And it contains fields which are used for the relationships to tables in which records will be created or edited or deleted.
If you use the DBTransactions table, it is the starting context for every transaction in your entire custom app. It’s helpful to have all of them start at one place.

But your starting context can be any context that makes sense. If the use case is to copy Estimates and estimate line items to order and order line items tables, you could use the Estimates context as my starting point. If you need to copy estimate #4392 to an Order record, your starting point is Estimate #4392.

Schema

The starting context contains fields that are used in relationships to the tables where data will be added or edited. All the relationships are set to “Allow Creation of records in this table via the relationship”.

The DBTransactions starting context.

The Estimate starting context

In the starting context table I’ve got two fields, “TR_OrderId” and “TR_OrderItemId”. These fields are related to the primary key fields of the respective tables. We use the primary key fields because the relationship needs to be unique per record we will create.

Collect the data

Of course it’s always good to collect the data that will be added or edited. In the example we are following (copying estimate to order), we could collect all the data, both the estimate record information and each estimate line item data as a JSON object and store that somewhere temporarily. This gives us confidence that the data we have stored is correctly synced with itself. It is one complete object and one complete record. Once it is stored, changes can’t be made to individual fields in this one estimate record.

In our current example, if the starting context is indeed the Estimate record, then we don’t really have to collect the data since it’s already in the current record.

Validate and take ownership

Additionally we might want to validate the data. We want to make sure there is actually data to process and that there’s no errors in the data.

Also, we want to take ownership of the vital records. I don’t want anyone to edit the Estimate record and EstimateLineItem records while I’m copying its data to the Order table, so my process needs to own the record (lock it) during the process. If we’re editing records, it is possible to lock each of those in the starting process. So we open the Estimate and individual line items records.

Call a start transactions script

In Todd’s post about Transactions long ago, he states that there is no ‘start transactions’ script step that we can run. But we can put all of the starting tasks into a subscript and call this at the start. Our Karbon framework contains a script called “Start Transaction”. This file set and the transactions at modularfilemaker.org are good models for the script.

Any additional tasks

If you’re using the DBTransactions (or something similar) you might find it useful to create a new record for every transaction process (the entire process: creating all records in the order and order line item table). You can record the binary result of the process: did the transaction go through or was it rolled back.

The process to start a FileMaker transaction is fairly straightforward. Whatever the details, this step sets up a likely successful transaction. The process gets all the ducks in a row before the transaction takes place.

In the next post, we’ll talk about the transaction process itself.

A big part of our work as FileMaker developers is to design workflows that create or edit or delete records. If your scripted process requires that it completes the changes (adding or editing or deleting) to multiple records, then a database transaction is required. If a discrete entity (an invoice and invoice line items, for example) needs to be completely changed, then a database transaction is required. Let’s take a look at how database transaction works so that we can have confidence in FileMaker data changes.

An example to consider

Let’s imagine a custom app for a printing company. They create estimates with estimate lines.

The business workflow requires an estimate and its lines be copied into the order and order line items tables respectively. Here would be a typical script we might write.

There are issues with this script. Take a moment to study it. Based on what I’ve written above, what problems do you see?

I’ll wait. 🙂

The biggest problem is that I’m committing the new order record and the new order line items records individually. Here’s the sequence of events:

  1. I go to the Order Table and Create a record
  2. I go to the Order Line items table. In this action, the Order record gets committed
  3. I create a new record in Order Line Items table.
  4. After the first iteration of the loop, I create a new record. That commits the previously-created line item record.

We can see this commit after commit after commit happening. In the Data Viewer, Get(RecordOpenCount) shows 1. There’s only one record open. The previous records have been saved to the file.

If, while the script is running, the power goes out or the network collapses, some of the order line items records will have been created; others won’t.

That’s a problem, right?

The solution

FileMaker is a transactional database platform. A transaction is the complete process of getting records created or edited or deleted. The process is set up so that all records get saved to the file after creating or editing. The process is also set up to rollback changes made to records. The transactional model gives us peace of mind to have confidence in our FileMaker data

Commit all records

Your goal as a FileMaker developer is to provide a trusted workflow that keeps a user’s data intact and complete. Transactions ensure that all changes you made to records in the database get committed and saved to the database at once.

Rollback records

If there’s an error anywhere–power loss of incomplete data or record ownership issues–FileMaker Transactions rollback the data to their previous state. The changes (additions or edits or deletes) made against records, using a transactional model, do not get saved. The Pre-saved data is kept.

Transaction steps

The complete steps of a transaction are as follows:

  1. Start the transaction
  2. Create or edit or delete records
  3. End the Transaction

We can do all of these in FileMaker, and none of them are that difficult that even a new-to-FileMaker person cannot handle them. I’ll briefly explain these and then we’ll look at these in more detail in further posts.

Start the transaction

To perform the transaction, we need to start it. We get the correct context to the front, we get up the data to be added, and just get ready. The start step can include any of the following:

  1. Go to the proper transaction layout
  2. Validate the data to be added or edited.
  3. Create or open the transaction record. Record any transaction log information.
  4. Take ownership of records.

No matter the steps we take here, the last one is to continue or stop the transaction process if something’s not right.

Change multiple records

Once the transaction has started and we can continue, we add the records, edit the records, or delete the records.  This is the easy part. It’s what we script for every day. We’ll talk through this in detail in an upcoming post or tw.

End the transaction

In the transaction’s ending we:

  1. Try to commit the record changes made
  2. Check to see if there’s any errors
  3. Revert the records if there’s any errors
  4. Optional: Clean up. Record the success (or failure) and any other information about the transaction.

Transaction structure

There’s a simple structure to FileMaker Transactions. It requires just a few things:

  1. A Starting context
  2. A relationship to table occurrences in which records will be added. This relationship is set to “Allow Creation of records in this table via the relationship”.
  3. One or more scripts that control the record creation or editing or deletion and prevent any commit of records accidentally.

Have Confidence in your FileMaker data

Okay. This is enough for now. It’s a process, and one that deserves a through discussion. We’ll talk in the next few posts about the three steps: starting the transaction, doing the transaction, and ending the transaction. We’ll talk conceptual and practical. The whole point is to have confidence in our FileMaker data, to make sure that all of the changes get made or none of it. This topic merits more details. So we’ll talk through it here in upcoming posts. Stay tuned.

WidgetStudio gives all FileMaker developers a break. The dev tool solves a simple or complex FileMaker use case by making a web viewer widget that just works. It saves the developer brain power, frustration, research, and lots of trial-and-error. There are useful widgets available right now in WidgetStudio, and many more on the way. The tool was developed by a FileMaker developer. It is designed to give FileMaker developers the most FileMaker value add to their development of client custom apps.

The benefits to using WidgetStudio are legion:

  • You can solve a use case faster.
  • A widget brings a lot of functionality and modern user-interface elements.
  • The deployment process is painless
  • There’s little to no testing involved.
  • The widget you employ can be customized to any client app and data.
  • The Widget you employ can interact directly with FileMaker data
  • You don’t need to know how any of it works.

Let’s dive in and see how WidgetStudio brings value add to your development process.

Solving use cases faster

First, every single widget so far in WidgetStudio solves a typical case for FileMaker developers. Nothing’s in there that is superfluous.

  • When a client asks for a portal-like list view with column sorting (including multiple columns), as-you-type filtering, and pagination, the DataTables widget is your solution.
  • When you need to chart a lot of data, all the charting solutions are useful.
  • Progress bars can show the progress of a project.
  • A Data tree can be used to show data in a tree.
  • And there’s many more.

The value add by WidgetStudio is that these widgets are created in a very short amount of time. There’s really no comparison. Creating a pivot table using ‘idiomatic FileMaker’ would take hours.

WidgetStudio includes complex widgets that would take a lot of time to create in FileMaker.

I can deploy a pivot table using WidgetStudio in under 15 minutes. The time I saved by deploying a widget can be then spent on additional features or additional scope. That’s a lot of FileMaker value add.

Full functionality

Second, each of the widgets in WidgetStudio is a complete feature set. Much of it exactly what we can use in our custom apps. The Date & Time picker, for example, contains all the text and buttons and code and styles to select one date or a range of dates.

This library comes with additional functionality that allows for custom date ranges.

 

The value add comes in that in the single deployment from WidgetStudio, a FileMaker developer has ‘created’ all necessary UI elements and functionality. In one button click.

Painless deployment

I’ve written about this before. And believe me: I’ve experienced all the ways possible to deploy a web viewer widget. Nothing comes close to the ease by which WidgetStudio deploys a widget.

Again, the FileMaker value add comes in the little time it takes to deploy. But so too is there value in the way widgets are deployed. There’s no extra schema or fields or relationships necessary. There’s zero to one script and the web viewer object. That’s it. This object and the script can be placed anywhere in your app.

Another value-add factor: I have absolute control over the widget. Of the three deployment methods, two of them create the script steps necessary to load the widget. I prefer that. I prefer to control everything with scripts.

It just Works

The JavaScript library was built by a JavaScript developer and has been tested hundreds of times. Most or all of the bugs been worked out, so we get a widget that is very much bug free. The value add here is simply the time we get back not having to test EACH SCRIPT that is part of the widget.

Customizations galore

WidgetStudio’s interface is brilliant as it provides a clean, simple way to customize the options of each widget.

You don’t have to dig into the CSS to change the font or the size or color of the text. It’s a simple few options. The value add here is (of course) the time saved, but also the success you’ll get in customizing the widget and seeing the results.

Interact with FileMaker data

Furthermore, WidgetStudio makes it simple to pass data from the widget to FileMaker. It just works. You set up the name of the file and the name of the script to run, and WidgetStudio sends the data back in the form of a JSON object to FileMaker. There’s plenty of information in the widget to let you know what to expect. And WidgetStudio can even CREATE the script steps for you. Do you see the value add here?

You don’t have to know anything about it

And finally, the biggest FileMaker value add to a developer is that all the above benefits just work, and you don’t need to know about it.

The lack of knowledge isn’t because the workings aren’t a secret like a magic trick. Instead a FileMaker developer doesn’t need to worry about any of this. She doesn’t need to think about much of it. This frees her up to consider other things. We exert a lot of brain power during normal development. A Filemaker developer can use the brain power she saved to puzzle something else out

WidgetStudio: FileMaker value add

WidgetStudio provides much FileMaker value add to your development. You’ll be able to add a complex, fully-functional widget that solves use cases. And WidgetStudio solves them faster.

Check out the demo of WidgetStudio. Experience the strong value add to your development time and success.

Last week we introduced a game-changing app in the FileMaker & JavaScript space. WidgetStudio makes it so simple to add simple or FileMaker web viewer widgets to your custom app. From pivot tables to charts, WidgetStudio allows you to find or create, customize, and deploy the widget in a matter of minutes.

Find widgets

The WidgetStudio demo has three FileMaker web viewer widgets included that you can use to play with and see how the app works. But beyond that, there are more than ten other widgets that are available for WidgetStudio users (licensed and demo users) to view and customize.

Licensed users can deploy widgets from the library, but everyone can see what we have.

Here’s what we have so far.

More widgets on the way!

These eleven widgets are available now for review and deployment (with a licensed copy of WidgetStudio), but we won’t stop here. Over the coming weeks and for the foreseeable future, we plan to release widgets through the repository. So stay tuned to Geist Interactive and WidgetStudio on Twitter to get the latest.

If you have an idea for any FileMaker web viewer widgets, be it a JavaScript library or just a FileMaker use case, send it our way and we’ll try to create that widget.

Additionally if you want to make your own widgets, you can. Feel free to submit the widget to us to add to the repository.

WidgetStudio is a tool

Like a hammer, you go out and buy the hammer. You pay for the tool. What you build with it is up to you, and the hammer store doesn’t charge you for what you build. Likewise, WidgetStudio is a tool that has an annual license. How you use WidgetStudio is up to you; there is no additional charge for use of the widgets.

Use FileMaker web viewer widgets everywhere

WidgetStudio allows you to distribute FileMaker web viewer widgets in a few ways.

  • You can share a widget exported from WidgetStudio (as a .json file) with another developer.
  • You can deploy a widget using an embedded web viewer or through a script.

These royalty-free methods of distribution are completely independent of WidgetStudio. They will work regardless of WidgetStudio’s presence or active status. The widgets will continue to work in your system systems.

License options

We provide four license options of WidgetStudio. These licenses have everything to do with the number of computers that uses WidgetStudio. No one who simply uses a deployed widget in a custom app needs a license.

The power of FileMaker web viewer widgets

WidgetStudio gives any FileMaker developer access to powerful widgets that can be used in any custom app. We use them. Join us and check out the demo of WidgetStudio to give this power a try.

FileMaker is a complex platform. There’s FileMaker Pro Advanced, FileMaker Go, FileMaker WebDirect, FileMaker Server. We also have FileMaker Cloud, FileMaker Data API, Custom Web Publishing, and Runtimes solution. There’s a lot to the platform, and we, as developers need to know what works for each component. We should know as much as we can about FileMaker Script Steps and their compatibility to those parts of the platform we are targeting in our development. The best place to learn about script steps is in the FileMaker Script Steps Reference.

Very Helpful Help

As I’ve written in a few other posts (FileMaker Help and FileMaker Functions Reference), the FileMaker help system is vastly improved from years ago. There’s a lot of information inside each page. The folks at FileMaker, Inc. put a great deal of effort into the pages. It is very much worth our look and study.

The FileMaker Help Script Steps Reference Page format

Each script step is well document with the following sections:

  • Name
  • Options
  • Compatibility
  • Originated In
  • Description
  • Notes
  • Examples

Options

This section describes all the possible options you have with a script step, which are found inline (for boolean options) or in the gear icon. The more options, the more information there is here to read and understand.

Compatibility

Each script step has one of three compatible choices for each part of the platform: Yes / No / Partial. Here’s what the Sort Records Script step’s compatibility looks like.

Originated In

While seemingly benign, this section tells you if you can use a script step. As you read about techniques or get answers from the community, you should review it to see if you can use the step. Of course, if you’re on the latest version, there’s no problem. This section then becomes a cool FileMaker-trivia source.

Description

Here is where the script step’s purpose is described. It’s pretty straight forward, but one that should hold our attention. For example, the Sort Records script step description has this line.

 If you sort a repeating field, FileMaker Pro Advanced sorts on only the first entry in that field.

I didn’t know that. But I never use repeating fields for data-storage, so I guess it’s okay not knowing this 🙂

Notes

This section is worth its character count in gold. Here we can read some of the nitty-gritty details about the script step and learn why the script step has Partial compatibility in a part of the platform. For example, the Sort Records script step has partial support in FileMaker Server (scheduled scripts or Perform Script on Server). Here’s what it says

Server-side scripts, the FileMaker Data API, and Custom Web Publishing run this script step as if the With dialog option is set to Off, so you must use the Specify sort order option to save the sort order in this script step.

Again. Interesting and vital to our development. If this script steps doesn’t have a sort order specified in the step, the server-run script may end up with the wrong order of records.

I take my time to read and understand the Notes section. There’s valuable information here that might apply to us. I appreciate FileMaker, Inc. taking the time to write out these minute details.

Examples

The script step in question is shown in an example. There’s a brief narrative of what the script should do, and then the steps are listed. It’s a good source if you’re learning about the step.

It’s Worth the Look

The FileMaker Script Steps reference has much value to FileMaker developers. Many script steps have individual quirks about them, which are documented here. FileMaker developers new to the platform would do well to read the help while writing scripts or reading an answer on the community. Experienced developers could refine their understanding of the script steps. And, while unconfirmed, I’ve heard that many questions on the FileMaker certification test come from the “Notes” section of the steps.

When you need a break, when you’re stuck mid-script-write, or just want to waste time, read through a script step’s help. You’ll probably learn something new.

I’m pretty fascinated by the FileMaker help system. Specifically the FileMaker script step and functions pages. They are packed full of information that further illuminates my understanding of the FileMaker paradigm. When I need a break from the process of writing a script, or when I ‘discover’ a function I’ve not used from an answer on the community, I can turn to these pages and explore more about the FileMaker help functions pages. Let’s take a look at how they are set up and let me point out the value in reading these pages on your own.

FileMaker Help Functions Pages

The FileMaker help functions reference set of pages begins here. But I hardly ever start from this location. I usually begin my inquiry from FileMaker itself, and we can do that with the context-sensitive help. If so inclined, you can review functions from the alphabetical list or the category list. The latter is more useful when trying to get a sense of what FileMaker can do with text or numbers.

FileMaker help functions Page Format

Each FileMaker help function’s page follows the same basic format:

  • Name and Purpose (what it returns) of the function
  • The Format
  • Parameters
  • Data Type Returned
  • Originated In
  • Description
  • Notes
  • Examples

Parameters

This section shows a simple list and description of required parameters. Optional parameters are listed here as well. (I find these optional ones interesting).

Notes

Of these sections, I find the “Notes” one incredibly helpful. The text describes quirks or special circumstances or things to be aware of while using the function. Even well-used functions can have some interesting tidbit of information placed in this section.

Examples

The Examples are mostly helpful. Often there’s a description of the context (fields, values in fields, tables and relationships). The context can get a bit overwhelming to understand. I tend to just make my own examples as I can in the Data Viewer.

Originated In

The Originated In section is interesting from a historical perspective, and its information would make for quite a few great trivia games. For folks not on the latest version, this is useful. While developing in FileMaker 14, for example, If I’m reviewing the JSON functions, I will see in this section that the functions originated in FileMaker 16. I’m out of luck.

Worth another look

The FileMaker help functions pages have been around for years. They’re updated as functions change or as errors are found. The information found in these pages are worth a look from each and every FileMaker developer. New-to-FileMaker developers can learn the basics of the function. Experienced developers can learn more about the function. As I wrote this, I read that the Substitute function can support up to 999 nested substitutes. I don’t recall knowing that before now.

And since we can get to any function very quickly using the context-sensitive help, it’s worth some time to look and review functions. I review those functions the time just for fun. I also review those functions that are posted in the community as a solution to a specific use case.

It’s worth our time to review these pages once in awhile.