Maps in FileMaker WebDirect

SeedCode can now customize your ProMaps solution so you can run your maps in FileMaker WebDirect.

ProMaps doesn’t work in WebDirect by default, but KC Embrey and Jason Young have figured out how to customize it to create a seamless user experience. Check out this short video showing ProMaps running in WebDrect: notice how it can call FileMaker scripts in WebDirect and pass found sets between WebDirect layouts and the map. We’re thrilled with how this turned out!

Add This to Your File

If you’d like to run your copy of ProMaps in WebDirect, it’s a pretty complex modification. The description below meant to show advanced developers what we’re doing with WebDirect and how they can replicate that or extend it. Unfortunately, it’s not intended to be a step-by-step guide for getting your copy of ProMaps running in WebDirect. That’s not something we can describe in a blog post, but it is something we can set up for you if you’reinterested.

If you’re a developer fluent in custom web publishing or the new Data API, read on, and we’ll describe how we’ve set this up. If you need more guidance than that, we’re happy to get you an estimate and set this up for you: once it’s up and running, you can customize it like regular ProMaps. Please get in touch.

Maps in FileMaker WebDirect – Why Is This So Hard?

Until now, the problem has been that it’s tough to call scripts in a WebDirect session from inside a web viewer in the same session. If you ask your web viewer to run a FileMaker script by URL, for example, WebDirect will ask you to log in again and start a second WebDirect session, run your start-up scripts, etc. This is a terrible user experience. WebDirect has no support for tokens or deep linking which make this kind of thing simple in most web apps: once you’re logged into Google Apps, for example, you can open a document by URL without having to log in again.

Users run into this any time the map takes you to a FileMaker layout or runs a FileMaker script. When you click on a button to view a property record in your own layout, or when you perform a find in FileMaker and then as the map to show the found set: these kinds of action require communication between the web viewer and the WebDirect session. And this communication is not built into WebDirect.

The Solution

Using a Session Table. KC and Jason figured out that on-timer triggers in WebDirect could call scripts seamlessly: the trick would be telling the on-timer to run a different script depending on what the user asked to do. So they created a session table in ProMaps which has one record for every logged in user. Now when you click a button in ProMaps that would typically run a script, ProMaps instead sends the name of the script to your record in that session table. An on-timer script in ProMaps queries your session record to see if there are any scripts it needs to execute and when it finds one, it runs that script along with any parameters.

But how does the WebViewer write to your record in the session table if the whole problem is that the WebViewer can’t call FileMaker scripts without spinning up a new session? Instead of editing your session record with a script, ProMaps uses the web publishing gateway or the Data API to edit your session record. In our deployments, we use fmxj.

fmxj.js is an open source JavaScript wrapper for FileMaker XML web publishing. Jason Young created this in 2015 for DayBack Online. We wanted a dead-simple way to talk to hosted FileMaker databases in JavaScript without a lot of dependency on third-party apps. In this ProMaps solution, it’s used to let the web viewer edit your record in the ProMaps session table; we could have used the new Data API, but we’re very familiar with fmxj and it already has a method in place for handling authentication server side.

If you’re interested in using fmxj in your own projects, here are some resources:

Note: the “drop a pin” example in this video is not a stock ProMaps feature–KC added that for a customer and wanted to show that it also worked in WebDirect. All the other functions shown in the video are built into ProMaps. If you’d like your map to do something fancy, just get in touch.

Featured Posts

Follow Along

Stay up to date with the latest news & examples from SeedCode

2 Comments

  • Paula

    I would like to know how this is to set up for us?
    We are a fire department

    • seedcode

      Hi Paula,

      Running the map in WebDirect is customized for each site. Please send a note to support@seedcode.com and we’ll set up a screenshare to chat about your setup.

      – John

Leave a Reply

Your email address will not be published. Required fields are marked *

Check out some of our other posts ...

Suggesting Appointment Slots

Show Available Slots that Match Multiple Criteria Schedulers often look for gaps in their schedules to find the open resources for each opportunity. But sometimes,

Introducing Draft Settings Mode

Following up on this idea that people stretch themselves when they feel a little safer, we’ve been very focused on the customization experience for DayBack

New Longer Timescales for DayBack

Resource Scheduling Swimlanes You can now extend the pivoted scheduling view in DayBack to show items by week instead of solely by day. This lets

FileMaker Summer Camp – Recap

Unconference Sessions If you missed Pause in October, here’s a look at the sessions that attendees hosted. All the sessions are listed in this post

COMPANY

FOLLOW ALONG

Stay up to date with the latest news & examples from SeedCode

© 2024 SeedCode, Inc.