You know me. I enjoy working with JavaScript. I learned it from my context of a FileMaker developer, and I think everyone can and should consider using it in some aspect of their work. We all can adopt a FileMaker integration. This year I’m lucky to teach a training session at DevCon, where I’ll guide people through the basics and how to apply it to their work. While not every answer I give on the forums is about some JavaScript integration, I do promote it where applicable.

The time barrier

But I do realize that there are barriers to the language for us FileMaker people. I asked a question about this a couple of weeks ago. Most people responded with ‘time’. They simply don’t have time to learn the language. I think that is more of a perception than reality, but I acknowledge that idea. My training session will work to break down that barrier, by the way.

Because of this perceived barrier, I want to give folks a way to use JavaScript integrations without actually knowing JavaScript. How you ask? Well, this goal is accomplished by a cleverly-created FileMaker file: The DataTables config file. Let’s take at this barrier-smashing setup.

Introducing DataTables Config

The goal of this file was to give anyone the ability to implement the DataTables integration into their custom app. And the DataTables JavaScript library provides a heck of a lot of functionality for list views or lists of related records with no additional coding. You can set up a web viewer that shows related records with column sorting, go-to-related-records, column or row colors, filtering, etc.

DataTablesConfig.fmp12 is a  FileMaker file that simply generates the JavaScript needed for the integration after the developer adds or removes functionality. Here’s what it looks like.

I’ll say it again. This config file lets you set up the DataTables integration without messing with the JavaScript. After only ten minutes of setting it up, the above configuration produces this:

Gettin’ you hooked

This config file is meant to be a gateway drug into using JavaScript. Once you try it out and see how much functionality it adds to your custom app and how easy it is to set up, you’ll be interested in diving into the JS code. I guarantee that. You’ll want to look at the JS code (it really is just text) that makes this all happen. You’ll find it is easy to read (JavaScript is easy to read) and you’ll be inspired to mess around with it, to change something to see what happens. And in this case, no one gets killed by the curiosity. Mess it up, you can use the config file to revert back.

You’ll be hooked on JavaScript, and then you can continue to learn more about the language. We at Geist Interactive will guide you along.

Features of the DataTables config file

There’s too much to explain in detail here in a blog post, so be sure and check out the video that walks you through the app. But here are some highlights of its features.

  1. DataTables comes with a lot of default features and options. If you don’t want to customize your implementation, you can generate the default code quickly.
  2. You can add or remove features and options using the FileMaker data fields and UX provided here.
  3. There are detailed examples of how to format the text you wish to put in. For example, if you choose to have your default table sorted by column 3, you can choose the ‘order’ option and then pass to that option the following text: [2, “asc”] (this is a 0-based index). That’s easy enough to type, don’t you think?
  4. You can add additional extensions to your implementation, functionality that makes the integration more complex. Such as something that looks like a sub-summary report (grouped records) in little time.
  5. There’s plenty of help and descriptions of the features.
  6. You can (and should) map your fields to this config, and you can describe how each column should behave.
  7. You can add a callback function (Run a FileMaker script when you click on a row) and even assign a column to use in the search.
  8. You can set this file up to be a module, a separate file next to your custom apps and link to it. This action allows you to use the code stored here to display the data.
  9. Give some basic custom styling to the table.

There’s so much more that can be done, and we’ll explore Extensions, custom CSS, and calling FileMaker scripts in later posts and videos.

FileMaker Integration: Give it a try

I strongly encourage you to give it a try. Play with it, mess it up, do all sorts of stuff to it and figure it out. I promise it will not take hours and hours (maybe one or two). It won’t be a huge drain on your life.

Download the free tool. Watch the video. There are some fine points in this, and it is best shown in the demonstration.

Feel free to reach out at jeremy@geistinteractive.com with questions if you wish. I can answer some questions, or we can set up an implementation package to do some custom development with this configuration in your custom app.

Let me know how it goes.

 

 

 

 

You, Ms. / Mr. FileMaker developer can be a JavaScript developer as well. You can learn JavaScript and use it in your daily work.

FileMaker folks are suited for JavaScript. Though we may have stumbled into the FileMaker platform, we have enough knowledge and conceptual understanding to program also in JavaScript. There are many reasons why we can learn and why we should learn JavaScript. Let’s examine them.

Can Learn

A simple & powerful language

JavaScript was designed to be a beginner’s language. Like the Dick & Jane books or Sesame Street, JS’s structure and language is simple. It uses normal words and and a straightforward syntax. I bet you could figure out what this JS function does:

function sum (){
var a = 3, b = 5;
return a + b;
};

(answer: this is a function called “sum” that assigns values to two variables and then returns the sum).

This simple language is appealing. That’s not to say the language is impotent in any way. It is incredibly powerful.  Complex powerful applications that are used by billions of people around the world, like QuickBooks Online, and Facebook are built with JavaScript.

FileMaker knowledge

Our FileMaker knowledge can help us to learn JavaScript faster. We already have an understanding of such things as variables, variable scope, functions ( scripts and FM functions), and parameters. We can leverage what we know about FileMaker to help us learn JavaScript better.

The VAST community

On the recent StackOverflow survey, 62% of respondents said JS was their favorite language. People devote their career to working in JavaScript, so there’s a plethora of resources out there from which to learn and ask questions.

I learned it

Though I’m still plugging away, I feel pretty confident in my JavaScript knowledge. I played around with the language a lot and built countless FileMaker and html filles and watch hundreds of hours of video, but I learned it. You can too.

There are many reasons we can learn JavaScript. Let’s take a look at why we should learn the language.

Should Learn

Native FileMaker

We should learn JavaScript because it is a native part of FileMaker. It is supported on every part of the platform: FileMaker Pro and FileMaker Go runs JS in a web viewer, and FileMaker Server 16 includes node.js ( a JavaScript framework) in the install. Even WebDirect can run JavaScript in a limited way.

Since it is part of the platform, it behooves us to spend time with it and learn it. We can use JS to solve some vexing UI and scripting problems we occasionally encounter in normal FileMaker development. If your client wants a portal to have columns that sort in whatever combination she wants, a JavaScript library can solve this problem in much less time than it takes to develop it using FileMaker buttons and scripts.

If we have our way, FileMaker functions one day will call JavaScript functions. Right now we can do that with some small workaround (and will show that very soon). GoDraw3 uses this FileMaker-calling-JS-functions idea (check it out and download the unlocked trial version).

‘Tis the future

JavaScript will be around a long time:

  • JavaScript ranks number 1 in a survey of favorite languages or languages in use.
  • JavaScript is a cross-platform language.
  • The JS community invests tons of time in creating libraries
  • JS runs both on the client (in the browser) and server-side (using node.js).

If you do not learn it, your competitor will

Some day, some client will come to you with a use case to solve using their FileMaker custom app. Without the multi-tool capabilities of JS in your belt, the problem cannot be solved easily, and your client will find someone that can solve it.

Moonlighting

I know you’re not looking, but knowing JS can open up other job possibilities. JS developers are few, and the jobs are abundant. It’s a developer’s market.

So what’s your excuse?

Answer: there is none. It is important for FileMaker developers to see beyond just scripts and layout objects and view what’s possible and the tools that make those possible. So learn it.

Okay, I thought of an excuse: timing / familiarity. Folks think they don’t have the time to learn something that looks scary. Learning FileMaker is a full-time job, they say. These folks do not recognize their brains are primed for this language. It’s scary to jump into something new.

Join me at DevCon & Learn JavaScript

At FileMaker DevCon 2018, I will do my best to help folks learn JavaScript concepts and some techniques, taking away the scary and unfamiliar nature of it. We will spend a half-day training session learning the syntax and JS concepts, and will spend lots of time coding. We’ll start with FileMaker and use our knowledge of that platform to learn JavaScript. My training session is on Monday, just before the full conference starts.

Learning objectives

We have specific learning objectives. You’ll walk away with a lot of knowledge:

By the end of the session, FMDWBAT*:

  • Write JavaScript apps using the FileMaker web viewer and a text field
  • Pass FileMaker data to a JavaScript function
  • Retrieve the result of a JavaScript function to FileMaker
  • Customize an integration of popular JavaScript libraries
  • Use FileMaker scripts to call JavaScript functions (passing data to and retrieving data from the JS function).

*FMDWBT = “FileMaker Developers will be able to” –a derivation of a phrase I wrote on my classroom chalkboard/ whiteboard / smartboard everyday that proceeded that day’s objectives.

Complete documentation

Because I’m a teacher, you will be given lots of materials with which to participate during the session and continue your study afterwards. Here’s what will be available during and after the training:

  • The similarities between FileMaker and JavaScript
  • JavaScript use cases of varying levels
  • A playground in which to try out our JS code.
  • Videos of yours truly demonstrating a JS app for your repeated viewing at your own pace.
  • Great differentiated help.
  • Extensions: tasks and learning materials continuing through the week. Who needs the pool when you can continue to solidly your knowledge of JS.

Welcome anyone of any level

Join me and learn JavaScript as painlessly as possible no matter where you’re at in your FileMaker development path.

I’m a teacher at heart, so I’m there to guide and redirect and support anyone. We will work together to bring JavaScript more into the community so that we can talk about it from the FileMaker perspective just as often in the community as we talk about SSL or ExecuteSQL.

Feel free to shoot me any questions about the training. I’m happy to answer them: jeremy@geistinteractive.com.

See you in just three months!