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 ...

New Week Views in DayBack for FileMaker

You can now expand DayBack’s week views to show two or three weeks at a time. We’ve been using this internally in beta mode for a few weeks, and it’s very helpful to see what’s coming up next week while navigating this week’s work. Find tips on how to work with these new views on the DayBack blog.

To-Do Lists in FileMaker – New in DayBack Calendar

Now create and manage FileMaker to-do lists directly from the Unscheduled Items sidebar in DayBack Calendar. Our latest extension brings to-do behavior to any FileMaker table. Like unscheduled items, this behavior is based on a new checkbox field in your table, so some or all of your records in the table can be treated as to-dos. Mark your to-do’s done as you complete them, or drag them into the calendar to schedule time to work on them. See it in action here: Customize Your To-Do Lists This extension was designed to be pretty a scaffold onto which you could build your own, more specific to-do behaviors by customizing the action itself or the FileMaker scripts tha manipulate events. Here are some ideas to get you started. Add To-Do Lists to Your FileMaker Calendar If you haven’t already enabled the unscheduled sidebar along DayBack’s right edge, you can learn how to turn that on here: unscheduled items in DayBack. Then, download the custom action and learn how to configure it here: To-Do Lists in DayBack Calendar.

Improved Resource Selection

We’ve made some big changes to how you filter and assign resources when editing events in DayBack. These changes will make it much easier to work with large numbers of resources, especially for folks assigning multiple resources to the same event. Watch a video of the new behaviors and learn more here: Adding Multiple Resources to an Item. If you haven’t looked at your resource field mapping in a while, here is how you set that up: Mapping the Resource Field in FileMaker. Please get in touch if you have any questions about this; we’re here to help.

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, gaps don’t tell the whole story. You may have invisible criteria like skill-matching, cleaning requirements, or multiple resources to schedule at once. Or you may be on the phone with an opportunity and must suggest available times as quickly as possible. In these cases, DayBack can suggest the best slots that match all of your requirements. Scheduling Criteria Are Often Invisible In the movie above, schedulers can see openings for the two technicians, but they can’t easily see if the required rooms and equipment are free at the same time. While DayBack can show different types of resources simultaneously, as the number of criteria increases, it can be hard for schedulers to see everything at once and still make good decisions. Our customers often have rules that constrain when an otherwise open slot can be scheduled. Here are some of the invisible criteria we’ve built out for customers: Because DayBack is highly scriptable, it can scrub open slots against a variety of criteria to render just the slots that fit all your requirements. When multiple slots match, DayBack can even rank them so you can present the most ideal slots to your clients first. You Have to *See* Slots in Context to Make the Best Decisions Many scheduling apps present possible appointments as a list of dates and times. Without showing more information about each slot, schedulers can book days too tightly, always suggest the same providers first, or create huge gaps in some provider’s schedules. Ranking slots can help, but we’ve found that highlighting ideal slots alongside existing appointments gives schedulers the information they need to make the best decisions. We’ve seen schedulers quickly offer to split appointments or to slightly change services when they see available slots in the context of other appointments, trainings, vacations, and breaks. Getting Started We customize the recommendation of slots for each deployment as part of DayBack’s implementation packages. Please get in touch if you think DayBack could make a big impact on your team.

COMPANY

FOLLOW ALONG

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

© 2024 SeedCode, Inc.