Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

FR Toolbox and Talking With FileMaker

1. Introduction to FRToolBox and Asynchronicity

Anytime you create a BlackBox there is a single file that will always be included: FRToolBox.js

...

However FRToolBox has built in callback functions, so there are ways to do stuff with the FileMaker data that comes back.

2. Using parameters

Using our testing BlackBox from the first section, let’s try doing something with the parameter. A parameter can be anything, usually it’s a field name used to pull/push data, or something else like a string of text, number, date, etc.

...

Our BlackBox now does something!

3. Pulling records from your found set

Most typically, one or more of your parameters will refer to a FileMaker field so you can query data.

...

Reactor is now pulling through the values of the Schedules::Description fields for the records that are included in the related set from our current context.

4. Pulling a single record

We can pull records from a found set, but what if you want to pull a single record?

...

If you try changing the QueryValue to a different planet, the output will change accordingly:

...

5. Updating a record

For this section we’ll be creating two new functions:

...

For this section let’s create a new function that creates a new record.

6. CreatePlanet

It will have two parameters: PlanetNameField and PlanetDescriptionField

...

Now pop back to our PlanetList function, and confirm our new planet has appeared:

...

And there it is!

7. Deleting a record 

For this section let’s create a new function that deletes a record. As with the last section, we’ll build in an HTML interface - this time to identify the planet we wish to delete.

...

Success! Our testing planet is no more.

8. Polling For Changes

Sometimes you’ll want to show data changes in real time. For this section, we’ll utilise Reactor’s polling functionality.

...

Now open up a new window, and start adding new planet records, deleting them, and changing them. You’ll see your web-viewer reflecting this in real-time!

9. Running a script

For this section we’ll call a FileMaker script from within the web-viewer using Reactor.

...