SeedCode: NextWhat's next for SeedCode, FileMaker, Calendars, and the Web
Got this great screen shot in from Brent Foster at fastcuts.tv where they use our calendar layout to schedule video production…
Most developers don’t take enough advantage of how easy it is to add columns to the day view of our Pro Calendar: easy and looks great. Thanks Brent.
• Learn more about our Pro Calendar add-on: built solely with FileMaker Pro scripts and layouts.
Developers love that GoZync can be set to pull just a found set of records down to an iPhone or iPad. Folks use this to deliver just one user’s records–usually very specific things like “my customer visits for today” or “my active orders in this territory”.
Less well known but almost cooler is that you can give your users the ability to “push” just a found set of records back to the office. This is great for when you’ve modified a lot of local records, but only a few of them are “done” (only some quotes are finished, only some orders have been signed). Users need a way to send just these “done” records back to the server.
You’re In Charge of Which Records Sync
Out of the box, GoZync will sync any records that have changed since the last sync. You can also run the script “Zync It – this record” to sync just the one record you’re currently on (that really big sale you want to get back to the office right away).
But you can also let uses tag which records they want to sync and GoZync will sync those flagged records, leaving other modified records alone.
Here is a video of syncing found sets in action:
Behind the Scenes of Syncing Found Sets
One of the subtle things happening here is that we need to clear the flag when a record is successfully pushed to the server. This is actually quite tricky as a number of things could happen during the sync (record lock, network disconnect, etc.) and we wouldn’t want to clear the sync flag in those cases.
Fortunately, this is what having a “transactional” sync is all about: anything goes wrong during the sync and ALL edits are reverted, including the clearing of that “sync” flag.
While the video above shows us managing this flag with an auto-enter calc, GoZync 4 lets us you do this in a script: the same script you’d use to mark records as checked out, for example. Details in the instructions referenced below.
Adding This to Your Own Files
Once you’ve added GoZync to your file, follow the instructions here to add a flag field governing which records are pushed back to the server.
To control which records are pulled down to your iPads and iPhones it’s even easier: GoZync will look within the results of a find request for records that have changed since the last sync. If you can write a find request, you can sync that found set down to your users.
This, of course, is part of the GoZync philosophy: GoZync is written solely in FileMaker…so modifying its behavior is just modding FileMaker scripts and calcs.
The animations introduced in FM13 are great, but they still don’t let us animate the transition from one layout to another. This is something we’re looking for as it’s often used in iOS apps to move from list to detail and back again.
However, using full-layout slide panels, we can animate layout transitions as long as we’re careful to get the timings right. Our unlocked example file demonstrates how to do this in your own solutions and introduces using OnTimer triggers to queue animations that might otherwise be invisible within a single script.
Be sure to check out Part 1 of this article, showing how to make animated buttons, here.
FileMaker 13 – Go To Layout Animation
The video below demonstrates the animations and goes into how the scripts work. The whole thing is really pretty simple…
A couple notes for when you add this to your own files:
- The script decides to animate “left” or “right” based on the order of your layouts in the layout list. If you’re going to a layout “before” the one your on, we slide left. Heading to one “after” your layout, we slide right.
- This doesn’t work / apply in Web Direct since animations aren’t supported there.
- The animations don’t fire when you navigate using the layout menu, though I imagine they could. (Anyone want to mod that?)
- Objects placed on your “for-animation-only” panels don’t need to work. So while you’ll see we have navigation icons on these panels, that’s only because users see them during the animations. Users never interact with these panels.
- Finally, each layout also has an On Layout Enter script trigger: don’t forget those when you add this to your file.
Download the unlocked example file here: LayoutAnimations.fmp12
More Best-Of FileMaker 13 articles.
Syncing FileMaker Go
If you’re looking to learn more about syncing FileMaker Go, this Jan 7 webinar features demos of some of GoZync’s features along with a good deal of Q&A from the audience. Enjoy!
Learn more about Syncing FileMaker Go with GoZync: GoZync download, demo & screenshots.
I collect all the new calendars for iOS, even the terribly strange ones (for example, try to use–or to even pronounce–”Schelandars“).
One of my favorites is currently iCalendar which has a nice clean display and a simple interface for linking contacts and places to an event.
Of course any of these iOS calendars can show events from FileMaker if you’re using SeedCode Subscribe: once you add a Subscribe URL as a source on your iPhone it’s available to any calendar app on your phone. (SeedCode Subscribe requires FileMaker Server.)
Fantastical is probably still the reigning iOS calendar (and I use their desktop calendar to show FileMaker events as well) but iCalendar is definitely worth checking out.
FileMaker, Inc. has just published a case study featuring GoZync; it highlights the mobile solution SeedCode built for Blueprint Capital. Blueprint is one of the largest residential construction lenders in Seattle and their whole lending practice is run from a FileMaker solution named Blueprint Connect™.
Blueprint’s mobile app uses GoZync to synchronize construction inspections. Each of Blueprint’s active projects needs to be inspected every month; inspectors log the builder’s progress against the projects’ line items and take photos of the work. These are then synced back to Blueprint’s office so borrowers can take draws against their loans in proportion to the work completed so far.
This software replaced a paper system where inspections arrived in several large boxes and had to be keyed in during these marathon transcription sessions that were both stressful and prone to error.
Inspecting over 100 of these projects happens over just a few days and a customized version of GoMaps helps inspectors know which properties they have yet to visit. Images of site plans and renderings are pulled down to the iPad so folks can orient themselves on new projects, some of which may have barely broken ground when they arrive.
The GoZync-Powered inspection app offers the following capabilities:
Syncs a subset of properties to be inspected down to the inspectors’ iPads: only active projects with funds outstanding are inspected.
Photos, site-plans, and any new notes from the finance team come down to the iPad as well.
Though the in-office solution is quite large, the mobile app only syncs data from twelve tables: mirroring the structure of the main solution on an iPad would have been impossible.
Inspectors sync photos they’ve taken of each site and receive a confirmation that each project’s inspection has been successfully transmitted.
Syncs are done throughout the day as inspections are completed, usually three or four at a time. Each project takes just over a minute to sync.
As inspections can be called for at any time, inspectors can always sync down new projects to be inspected without having to come in to the office.
This lets Blueprint respond to builder requests for ad-hoc financing very quickly, often with inspections and checks cut the same day
With a single click inspectors can ask for and download new versions of the application (it’s in near constant development as we add new features).
Blueprint has devoted a couple pages of their annual report to their strategic investment in this software and we are very proud of our work here. We’ve built other mobile apps for Blueprint, including one managers use to get an overview of project finances, but we’re most proud of the inspections app as it has helped take a very time-sensitive and high pressure part of Blueprint’s workflow and turn it into something much more routine.
GoMaps – the mapping template used in this solution (comes with GoZync built-in)
Other GoZync case studies:
Project Roadmap: Mark Knoll, Blueprint Capital
Lead Developer: Jason Young
Maps and Sync: Tanner Ellen
GoZync Framework: Todd Geist and John Sindelar
Additional contributions: Chiyoko Yoshida and Lisette Wislon
Leverage your FileMaker Audit Logs
Here is a common reporting request: the customer has a project with a status field that changes over time. They’d like a report that shows what the status of the project was on a given date in the past. This can be pretty hard to do if you hadn’t anticipated this request to begin with. Fortunately, running a FileMaker audit log isn’t that tough and makes answering questions like this much simpler.
In our case we had been running a version of Ray Cologon’s Ultra Log and it had been tracking changes to this status field. If you’ve never used it before, Ray’s routine stores changes as a paragraph of text in a new field within the edited record. It looks like this:
We added a server-side script that explodes each of these entries into it’s own record in a new table (along with a couple other enhancements like capturing the name of the script running during any changes). We then clear out the original audit-log field. (Credit to Fabrice Nordman for inspiring this technique of turning entries into their own records. His FileMaker audit log is awesome and you’ll find a great video walkthrough here.)
With this data now stored as records, we could construct a SQL query to return the value of any field for a given date or time. By bundling this SQL into a custom function, we now have a very tidy way of grabbing the value of any field for any date in the past:
SeedCode_WaybackMachine ( ProjectID, FieldName ; Date )
In action, this looks like:
SeedCode_WaybackMachine ( “AC99215A-9506-485F-A14E-36339E2AEB2D” ; GetFieldName ( Project::Status ) ; Date ( 9 ; 1 ; 2013 ) )
(The actual SQL is specific to our solution but if you need help making queries like this, be sure to check out our free SQL Explorer. It’s a big help. Credit to Jason Young, both for explorer and for Wayback itself.)
We’ve been finding a lot of uses for this since we first created it for some financial reports. A couple of not-so obvious things about this are pretty cool:
• Our audit table is pretty big, so we split it up into one table per year: we’ll be able to alter the SQL query inside the function to search the correct table based on the date passed in.
• Since we’re only interested in the facts about “projects” (as opposed to other entities in the solution like contacts) we also have a parameter for the primary key of the project, this let’s us know which record’s status we’re interested in. In the future we may add an “entity name” parameter so we could query facts about contacts, etc. as well.
• The server side script which explodes these audit-entries into records runs hourly, a “refresh” button in the log’s interface will also run this on demand using Perform Script on Server so our log browser will effectively be real-time.
• Having these entries as their own records means they’d survive the deletion of project records, though records like that aren’t able to be deleted in this solution, just moved to an archived status.
Fish. Shredder. Catch the People.
Yes, that is the actual name of the game I made with my 5yr old son. It’s a good name. =)
Disregarding all obstacles I brought up this idea with my son. I suggested that we make a video game and asked him for some input on the type of game he would like. His first idea seemed a bit boring to me, two characters that would throw a ball back and forth.
The problem with setInterval is that the timing isn’t actually exact to the milliseconds. Often times code execution can offset the timing just enough that your animations can look a little bit chunky. To get around this you could shorten the amount of delay between loops to essentially create a much higher frame-rate. This will work but will leave less time for code execution and it isn’t really solving the problem as much as it is just pumping up the frame-rate to fool the eye.
Making FileMaker 13 Buttons Easy to Modify
FileMaker 12 and 13 give us a lot of new tools for making buttons look great. But if you want to use both an icon and text in your button you’ll need to make some tough decisions as this isn’t well supported out of the box.
The main issue is that while you can use an image as the fill for a button, you can’t position it to the left or right of the button’s text. This means a lot of folks are making their buttons completely in Photoshop–and making a separate image for each state (hover, pressed) in Photoshop as well. That works and looks great, but it often means heading back to photoshop when you want to resize or modify the button.
What We’re Doing
There are a lot of different approaches to this, and we’ll still make some elaborate buttons like the “close & refresh” button in our Pro Calendar. But what I’d like to show you here is what we’re doing for simple, everyday buttons. The kind that need to look great but get resized and changed all the time during development.
Feel free to jump ahead to the video below as it walks through most of what follows here.
The big idea is that we wanted an icon to the left of our text, and wanted the icon to follow along with the hover and pressed states of the button. Ideally we did not want to have to make 3 versions of every icon, one for each button-state.
We wanted a place where we could talk about some of the new things we're working on, post screen shots and code, and get some feedback from customers who want to be part of the development process.
This is where we get to talk about what's coming next from SeedCode.