This post will show you how to schedule GoToMeetings from DayBack Calendar using the new cURL and JSON functions in FileMaker 16, as well as how to do it in JavaScript if you’re using DayBack Online. 

Schedule GoToMeetings from FileMaker

Custom actions in DayBack let you add your own buttons to your events in the calendar. These buttons run your own FileMaker scripts and are a great way to extend the calendar’s capabilities. One great way to use Custom Actions is to interact with third party applications that have an available API (Application Programming Interface), like GoToMeeting.

Overview: GoToMeeting and FileMaker

I’ve been scheduling meetings in GoToMeeting quite a lot since I started at SeedCode. I’ve always done it manually, either by starting a quick meeting right before it was scheduled, or by creating it in the GoToMeeting app, copying that data into DayBack, and then sending the details to the customer.

Since DayBack is the shared calendar we use to manage SeedCode, it didn’t make sense to be duplicating work, both in GoToMeeting and DayBack. One quick search led me straight to GoToMeeting’s API documentation, so I set out to make some custom actions that would allow me to do all the scheduling, rescheduling, canceling and starting meetings directly in DayBack.

Here’s a video of it in action: https://vimeo.com/221944155

First: Getting an API Key for GoToMeeting

In order to permit DayBack to communicate with GoToMeeting, you’ll need to create a custom app and generate an API auth token. Both of these tasks are completed with your GoToMeeting account and are as simple as filling out a form. For more instructions on creating an app and generating your auth token, see the GoToMeeting API Getting Started documentation here: https://developer.citrixonline.com/how-create-developer-app

Option 1: Using DayBack Online

Custom Actions in DayBack Online are written in JavaScript. The custom actions I wrote for GoToMeeting take advantage of jQuery and AJAX for the functions that communicate with the server.

The fully featured DayBack Online – GoToMeeting integration requires 3 custom actions and 3 event actions, giving you conflict detection and resolution, and making sure rescheduled events are synced to GoToMeeting.

If you’re not interested in all those features, I’ve included a simple version of the CreateGTM script that will just check if the event is in the future and schedule the meeting.

Here’s the list of files you’ll need in the next step (download them here):

  • CreateGTM – Custom Action – Handles the creation of new meetings
  • CreateGTMSimple (Optional) – Custom Action – Simple create meeting function
  • DeleteGTM – Custom Action – Handles the manual deletion of existing meetings
  • EventClick – On Event Click Event Action – Saves the event’s scheduled time before editing for use in the EventSave script
  • EventDelete – On Event Delete Event Action – Checks if GTM details exist and prompts to delete meeting
  • EventSave – On Event Save Event Action – Checks if the event time has changed and prompts to update GTM accordingly
  • StartGTM – Custom Action – Starts a meeting if the details exist in the event description

Add these scripts to your DayBack Online account by going into the Administrator Settings, choosing your calendar source (this works with Google and FileMaker sources) and pasting each file’s contents into a new event or custom action field. For the event actions, you select the type of action with the dropdown. For custom actions, you just need to give each one the name that you would like to see on the custom action button. For more info, check out our documentation on Custom Actions in DayBack Online.

If you’re adding these to a Google Calendar source the actions you downloaded above are ready to go: all you’ll need to do is add your GoToMeeting API Auth Key into the top line of each script (except for the Event Click action). If you’re adding these to a FileMaker source in DayBack Online you’ll also need to replace each of the fields in [[brackets]] with the field name in your FileMaker table. So [[start]] might become [[DateTimeStart_Calc]]. Note that these start and end fields need to be timestamps (not numbers) so you may need to define new FileMaker fields for these.

That’s it! Return to the calendar and try out your new buttons.

Option 2: Using DayBack for FileMaker

Custom actions in DayBack for FileMaker can either be set to run FileMaker scripts or you can pass in JavaScript to be run when a button is clicked. One difference in DayBack for FileMaker, though, is that there are no Event Actions. All the work when creating, saving or deleting events is done through the FileMaker script “Create, Edit, Delete Event…” that comes with DayBack Calendar.

I had created the JavaScript functions for DayBack Online first, so the next goal was to translate those into FileMaker scripts. And since I needed to send URL requests to the GoToMeeting API, it was a perfect chance to show off FileMaker 16’s new cURL and JSON capabilities. (The demo file and everything which follows requires FileMaker 16. Need a trial version? Get one here.)

The demo file is a fully unlocked 30-day trial of DayBack and ready to use with GoToMeeting custom actions. (Download the demo file) The only thing you’ll have to do is enter your GoToMeeting API Auth Key into the Set Variable step on line 12 of the “Load Calendar Settings – On Startup…” script:

Once you’ve saved that, run the “Upon Opening” script and you’re all set to start playing with the GoToMeeting functions.

Adding the GoToMeeting Actions to Your Copy of DayBack

If you’ve already got your own copy of DayBack, and are using FileMaker 16, you can integrate the GoToMeeting functions into your own file with the following steps:

1. Copy the entire GTM script folder and all contained scripts to your file.

2. Refer to the screenshot above and copy that new first line from the script “Load Calendar Settings – On Startup…” into your version of that script. Be sure to enter your GoToMeeting Authorization Key into the value.

3. In your “Load Source Settings at Startup…” script, under the source number you would like to add the custom actions, find the section commented “Custom event actions for WebViewer popover”…

…and in the Set Value script step on the next line, add the following 3 lines to the calculation:

"Create GTM Meeting, GTM - Create Meeting" ;
"Delete GTM Meeting, GTM - Delete Meeting" ;
"Start GTM Meeting, GTM - Start Meeting" ;

4. Finally, copy the script steps as shown in the images below in the script “Create, Edit, Delete Event…“ from the custom version of DayBack. Paste the script steps into the same script in your file:

Lines 109-111; 117-124; 132-135.

Lines 265-299.

5. Save all your scripts and run the “Upon Opening” script to see your changes take effect. Now you can start using your GoToMeeting custom actions!

Conclusion

DayBack’s custom actions can interact with many different applications. This example shows how comprehensive and fully-featured such custom actions can be. If you’re interested in connecting your DayBack solution to a 3rd party application, but don’t feel up to the task of creating your own actions, we offer Implementation Packages where we can develop these to meet your requirements. If this interests you, please reach out

The latest in-app update to DayBack Calendar lets you include more fields inside the calendar. This is great for cases when you have required fields or field validation that previously couldn’t be addressed by the default calendar fields. Having access to more of your fields means you can make more edits inside the calendar where things like option-drag make creating and duplicating events very fast.

These additional fields also show up in calendars you share with folks who don’t have FileMaker, delivering more information about each event.

In the screenshot below you’ll see four new fields added to DayBack’s “additional fields” drawer.

Create as many additional fields as you’d like and add different fields to events from different tables (different calendar sources).

Format your fields with fast entry options like drop-downs, date pickers. For details on all the field entry formats available, and for instructions on how to add your own additional fields, checkout the documentation here:

Additional Fields for DayBack Calendar

Don’t forget to make sure you’re using the latest in-app update to DayBack.

DayBack Calendar and all our shipping products work great in FileMaker 16. If you got a SeedCode app before FM16 shipped on May 9th, 2017 you may need to make a few small changes to bring it up to date. Here’s what you need to know:

DayBack Calendar: FM16 added a security option to the fmp:// url protocol that you’ll need to enable in your files. This is a very easy change and details are here: FMP URLs in FM16. Once you’ve made this change, any version of DayBack from 9.90 onward works in FM16. This might be a great time to make sure you have the latest version of DayBack as it keeps getting better with in-app updates: latest version. (Note that FM16 doesn’t print web viewers  any more so printing the calendar is now best done with screenshots.)

ProMaps: the map has the same url issue above: just enable the new extended privilege and you’re all set. We also introduce a small change to make the map work in Mac OS Sierra, so if you’re on Mac you’ll want to make the change described in version 1.053 here.

GoZync: we released a new update to GoZync and you’ll want to upgrade to this when you switch your FileMaker Go clients to FM16. Details and instructions are here.

We’re pretty psyched about FM16, especially the opportunities it provides for passing script parameters using the new JSON functions. That should make working in someone else’s scripts a lot easier.

FileMaker™ 16 introduces native JSON parsing which may finally give us a common language for passing multiple script parameters. This should make sharing scripts a lot easier. And while unpacking (reading) JSON script parameters is pretty simple, there are a few tricks to passing (writing) JSON using FileMaker’s new functions.

Overview: better script parameters

The new release of FileMaker 16 includes built-in functions for reading and writing JSON: a lightweight data-interchange format widely used to pass data around between web apps. This is why it was included in FileMaker 16: to complement the enhanced cURL support, but we can use it outside of a web context to make script parameters much more reliable.

(If you’re just looking for the example file, here it is: JSONScriptParameters.fmp12)

While I’m relatively new to FileMaker, I have quite a bit of experience with JSON. And, honestly, I found FileMaker’s JSON implementation to be a little quirky/unique. I would venture to say that I even disagree with how the very important JSONGetElement function is implemented. This brings me to the first, and most surprising, thing about FileMaker’s JSON implementation:

No matter what data type you pass into your JSON parameter, the result will always be returned as text by FileMaker’s JSONGetElement function.

Weird, but we can work with it. More on this later =)

We’re going to be exploring whether it can be beneficial to pass multiple script parameters between FileMaker scripts using the JSON as the parameter format. To review, passing single parameters between scripts is built-in to FileMaker, but once you need to pass more than one parameter, you need to come up with some kind of grammar in order to tell one parameter from another. And it would be good if your grammar understood blank parameters and didn’t freak out when your parameter contained something unexpected like a carriage return.

Currently, in order to pass multiple parameters from one FileMaker script to another, you can:

  • Create global variables, which is messy as they need to be cleaned up each time the script runs. Plus, they don’s span files.
  • Use Let() notation like(name = value ; name2 = value2 ;)
  • Pass a single delimited text string with each of your parameters in order.
  • Or use a custom function, such as fmpstandards’ #Name-Value.

Is formatting script parameters as JSON an improvement?

Read Full Article →

Easily Create Public URLs from your FileMaker Calendars

You can now easily publish and share calendars and project timelines with folks outside your organization who may not have access to your FileMaker solution.

The new “share” menu in DayBack will create a public url matching your view: shares can include events from multiple tables and respect your filters. What you see is exactly what gets shared.

Changes made in DayBack are automatically synced to that url so it stays up to date.

We love this new feature and are using it to publish our own schedules, including the agenda for the PauseOnError conference (see the schedule).

Highlights

  • Share recipients don’t need FileMaker or a DayBack account to view your share. They just click on the url you’ve sent them, and they’re in.
  • Shares include DayBack-specific views like the horizon (gantt chart) and resource planning grids.
  • Changes made inside DayBack Calendar are synced to the share in realtime. Manual updates will sync changes made outside of DayBack (like changes made in our other FileMaker layouts), including records that weren’t part of the original share.
  • You can create multiple shares from the same calendar, sharing just a filtered subset of your schedule.
  • If you want to share read-write access to your calendars, recipients will need a DayBack Online account: here’s how to invite someone to your DayBack Online account.

More details are available in our documentation, including notes on how to restrict the creation of shares, and how to style your shared pages. Here’s a quick video of what sharing looks like in practice:

Get It Now

Sharing is available in the latest in-app update to DayBack. Details on how to activate sharing in your copy are here: enable sharing.

This is the easiest way to share your FileMaker events–easier than plugins, Zulu, or SeedCode Subscribe, as it doesn’t require you to install anything on your FileMaker Server, doesn’t require web publishing (so it will work in FileMaker Cloud) and doesn’t even require that you have FileMaker Server. =)

If you already have DayBack Online, sharing is a new benefit of your DayBack Online subscription and is already available in your group (or start a trial of 30-day DayBack Online here).

Please check it out, share your plans, and get everyone on the same page.

 

Customers often want to track stats about the resources they’re scheduling in DayBack. They want to answer questions like…

“How many hours do these assignments represent?”

“What is the total cash value of the confirmed bookings this week?”

Stats like these are easy to add to DayBack and this post describes two different methods for calculating them.

Like many developers, I usually think of using relationships first when deriving date-range stats like these. While that works, I’ll suggest that using find requests is much easier and results in code that requires a lot less maintenance as your requirements change. A description of both approaches follows, along with unlocked example files.

In our examples, we’ll total a new field in the events table called “Cash Value” and count the number of events in a given week.

Overview

This short video shows what we’re trying to accomplish and introduces the two different techniques.

Step-by-step instructions for each technique follow below in case you’d like to add this capability to your copy of DayBack. And here are the unlocked example files for each approach…

Read Full Article →

A customer recently wanted ProMaps to default to Satellite mode, and since customers have access to the map’s html, this was a pretty easy mod to make. Step by step instructions follow, but here’s what it looks like:

(You can toggle the 3D display and switch back to an overhead display by clicking the grid icon in the lower right.)

Making satellite mode the default in your FileMaker map

1. To make this change in your copy of ProMaps, first backup your file. Really.

2. ProMaps stores its settings in a single FileMaker record on the MapSettings table. The HTML template is stored in the MapDataTemplate field. To update the MapDataTemplate, you’ll have to add the MapDataTemplate field to one of the Settings layouts. I chose the General Settings layout. Once you can get at this MapDataTemplate field, enter browse mode and select all the contents of the field, copy them, and paste all that HTML into a text editor of your choice.

3. In your text editor, search for the following line:

mapTypeId: google.maps.MapTypeId.ROADMAP,

Change that line to the following:

mapTypeId: google.maps.MapTypeId.SATELLITE,

4. Once you’ve made that change, copy the contents of your text editor and paste the entirety back into the MapDataTemplate field in your settings layout and commit the record. After making this change, you can run the “Upon Opening ProMaps” script and your map will now default to satellite view. =)

5. If the file is cloned, this record will get deleted, so we needed a way to restore the default settings automatically. To do this, you’ll find a hidden layout called “ProMaps Template”. You’ll want to update the layout in order to ensure these settings are carried over if you ever clone the file in the future.

In order to update the layout, navigate to the ProMaps Template layout in layout mode. Then replace the contents of the left-most field with your text editor contents and save the layout. Don’t add a new object to the layout: select the text in the object already there and replace the text with the new HTML you’ve edited.

With these changes, you should be all set to have ProMaps open in satellite mode by default, and any cloned files will have the settings preserved.

Enjoy!

Learn more about adding ProMaps to your file

Many FileMaker developers use FMP URL links in order to get FileMaker scripts to run from actions taken in a web viewer. For example, this is how DayBack calendar runs your FileMaker scripts when you edit an event in the calendar.

When FMP URL links are functioning properly, these scripts can update records flawlessly. When they don’t work correctly, they may try to open another copy of FileMaker, or just fail silently. And things that fail silently can be really hard to hunt down.

Here’s a great introduction to these URLs if you’re new to them: the FMP URL protocol in FileMaker. But don’t worry, you don’t need to know how these work to use DayBack, ProMaps, or any of the other apps based on web viewers. In fact, when you’re using DayBack and have your script debugger on, DayBack’s FileMaker scripts fire when you’re editing events just as if they were called without a URL.

When we were trying to come up with a way to verify that a client’s FMP URL links were working properly, we first came up with the idea to run a script upon opening the file that uses the “Open URL” function. This URL sets a global variable in the file to “true”, which is then checked further in the script to verify that FMP URL links are functioning. If the variable is not set, then the script throws an error.

Here’s our first attempt at seeing if the URL was firing:

Unfortunately, we found that the “Open URL” script step sometimes resulted in the test passing, even when FMP URLs were not functioning properly.

It turns out the “Open URL” script step works just a bit differently than FMP URLs started in the web viewer: the script step almost always targeted the correct version of FileMaker, while the same URL called from the web viewer would not.

It seems the only way to definitively test the functionality of FMP URL links is to start the test from a web viewer or a browser: we opted make a web page available that the user can browse to and click a link to run a script in the file.

You can see our test in DayBack’s documentation here: FMP URLs

One caveat to this method is that the user’s file name must match the filename in the link. This is why we’ve included instructions on copying and pasting the link into their browser’s address bar, customizing the link to their own file name.

FMP URL link issues can be tricky to diagnose. Hopefully, this can be helpful for those of you running into the same issues in your environment.

The latest in-app update to DayBack Calendar introduces 21-day and 30-day resource scheduling views, so you can look a bit further forward when balancing your workload. Like “breakout by resource“, introduced last week, these options let you work at longer timescales so scheduling problems don’t sneak up on you.

These new date ranges are available under the “days” menu when you click on the Resources tab in the upper right of the screen. This in-app update requires no FileMaker changes if you’re already up to date, so click “Account Settings” in DayBack’s settings tab, then “Check for Updates”.

Enjoy!

Checkout the great mod Eric Luce has made to get DayBack’s help scheduling editing suites for the Arizona Center for Digital Media Arts.

“We use the DayBack calendar in multiple instances, each for a slightly different purpose. Where you see the sidebar on the right side is for scheduling shifts of student workers. The other screenshots show the room reservation calendar where students can check out our Studios, Private Edit Suites, production offices, etc for their film and broadcasting projects.

Most of those rooms are very multi-purpose, so they can actually be used for film (audio and video), broadcasting, or graphic design.”

Love to see how well he integrated DayBack with the other tabs and tasks in his solution. You can learn more about DayBack’s resource scheduling options here: Resource Scheduling in FileMaker.

Learn more about DayBack Calendar

DOWNLOAD
DayBack Calendar
DayBack's 30-day trial is unlocked so you can customize it and integrate it with your files.
Download DayBack and we'll send you a couple short emails with tips on how to modify it and use some of the coolest features.
Thank you! Please download: DayBack Calendar
Need More?
SeedCode tips & example files in your inbox
Need More?
SeedCode tips & example files in your inbox
Want More?
Be the first to see articles and tips like these
DOWNLOAD
TimeZync
Download TimeZync and we'll send you a couple short emails with tips syncing your FileMaker Go files.
Thank you! Please download: TimeZync
Want More?
Be the first to see articles and tips like these