FileMaker: Explore
Welcome to The Support Group's blog, where we hope we can contribute to the FileMaker community — experienced developers and beginners alike. We believe that whatever we're doing — whether it's designing a new system or teaching a training class — everything starts with dialog. We welcome your feedback and ideas.
by Chad Novotny on Jul 27, 2010,
filed under: Get ( Answers ), Tips & Tricks, Advanced Techniques, FileMaker Go, Downloads
Elizabeth in San Francisco is one of many to ask this interesting FileMaker Go question:
Is there any way to get the latitude and longitude of the phone in FileMaker Go and store them in a database?
My first reaction was “unfortunately, no.” FileMaker Go can’t access the GPS features of the iPhone, and since we can’t use plug-ins with Go, there’s no opportunity to add that feature. But never say never, right?
After a few more moments thought, the answer appeared: FileMaker can’t access the GPS… but Mobile Safari can… and FileMaker has the web viewer. Ah, the web viewer—FileMaker’s Swiss Army knife—how we love you!
Here’s our solution, requiring one web viewer, one script (plus a few more for fun), and just a few fields.
Read more ►
UPDATE: Todd Geist is doing something similar. I like that’s he’s capturing altitude…I’ll need to see what happens the next time I take a flight offering WiFi 
I created a simple webpage that uses the HTML5 geolocation features used in Safari.
<!DOCTYPE HTML>
<html>
<head>
<script type="text/javascript">
function handler(location) {
var messageArea = document.getElementById("messageArea");
messageArea.innerHTML="<p>Latitude: " + location.coords.latitude + "</p>";
messageArea.innerHTML+="<p>Longitude: " + location.coords.longitude + "</p>";
messageArea.innerHTML+="<p>Accuracy: " + location.coords.accuracy + "</p>";
}
navigator.geolocation.getCurrentPosition(handler);
</script>
</head>
<body>
<div id="messageArea">
Location unknown
</div>
</body>
</html>
With a browser that supports HTML5 geolocation services, when the location is detected the the result of that page should something like:
Latitude: 42.3028843
Longitude: -71.3770951
Accuracy: 30
with the source code now appearing as:
<html>
<head>
<script type="text/javascript">
function handler(location) {
var messageArea = document.getElementById("messageArea");
messageArea.innerHTML="<p>Latitude: " + location.coords.latitude + "</p>";
messageArea.innerHTML+="<p>Longitude: " + location.coords.longitude + "</p>";
messageArea.innerHTML+="<p>Accuracy: " + location.coords.accuracy + "</p>";
}
navigator.geolocation.getCurrentPosition(handler);
</script>
</head>
<body>
<div id="messageArea"><p>Latitude: 42.3028843</p><p>Longitude: -71.3770951</p><p>Accuracy: 30</p></div>
</body>
</html>
Notice the change following <div id=“messageArea”>.
UPDATE: Depending on what browser you use to test this, viewing the source may or may not show you the alteration in the messageArea div. With Safari, use the Web Inspector’s Elements tab, rather than View Source; with Firefox and the Web Developer extension, use the View Generated Source option in the toolbar.
Next, we place that same webpage source code in a FileMaker global text field. We create a web viewer with the object name “web” and specify a calculated URL:
"data:text/html," &
geolocation::code
Using a URL that starts with data:text/html, tells FileMaker to treat the following text as an HTML page. Essentially, it allows us to render a page from source code without needing a server and an HTTP request.
Our script resets the web viewer, waits a small amount of time to make sure the page has had time to render, and then checks the results with the formula GetLayoutObjectAttribute ( “web” ; “content” ). If we have a result that contains <div id=“messageArea”><p>Latitude, bingo!
Now it’s just a simple matter to use FileMaker’s text functions to parse out the latitude and longitude. We’ll need to do a little extra work to handle Apple’s data detectors—Mobile Safari sees the latitude and longitude numbers as possible phone numbers, and places <a href=“tel:...”> tags around them (UPDATE: We’ve updated the sample file to account for Mobile Safari not always detecting latitudes and longitudes as possible telephone numbers; our script sometimes gave us double negatives). Once we have the latitude and longitude stored, an additional simple script can open a map to show us our location:
Open URL [No Dialog; "http://maps.google.com/maps?q=" & geolocation::latitude& ",+" & geolocation::longitude]
Log in or register to download the sample file.
Contract post ▲
by Chad Novotny on Jul 20, 2010,
filed under: Announcements, Get ( Answers ), Reflections
Today’s the lucky day for all of you that have been asking, “When is FileMaker going to make an iPhone app?” FileMaker Go is an amazing new iOS app that gives you access to your FileMaker solutions on your iPhone, iPad, and iPod touch.
We are incredibly excited about the possibilities now available for our customers—and for us personally, too! FileMaker Go runs most .fp7 databases without modification. Layouts are rendered almost identically as in FileMaker Pro; portals, tabs, and Quick Find work; technologies such as web viewers, script triggers, and External SQL Sources (think of the possibilities there) all transfer to your iDevice. And you get the best of both worlds: you can connect remotely to an available FileMaker Server WiFi or 3G to access live shared systems, or you can copy a .fp7 file to your phone or iPad to carry your data with you.
Contact us to learn how we can develop a new application for you or help you take your solutions mobile.
Before you get started with FileMaker Go and your current databases, you’ll want to consider some differences between FileMaker Pro and FileMaker Go.
Read more ►
FileMaker Go does not have a Layout mode or access to defining tables, fields, relationship, scripts, or value lists. In other words, you still need FileMaker Pro (or Pro Advanced) to build your solution.
Certain scripts steps won’t work in Go, or will work differently. The limitations are somewhat similar to the limitations you’ll experience with Instant Web Publishing: for example, there’s no printing, saving to PDF, importing or exporting, etc. Knowledge Base article 7734 lists the calculation and scripting behavioral differences in FileMaker Go. There’s also no support for plug-ins, so any scripts or calculations that make use of such need to be rethought.
No charting à la FileMaker Pro 11. Oh well, you can’t have everything. Where would you put it?
This Knowledge Base article gives some pointers regarding optimizing your layouts for display on an iPhone or iPad. The screen size is going to be smaller (obviously), styled text may not render the same, radio buttons might be problematic, and you can’t use auto-complete or insert from the index. Also, check out article 7743. It lists some miscellaneous changes you’ll experience, such as lack of rich text exiting, working with the web viewer, how custom menus work on Go, and navigating through the tab order.
Download the FileMaker Go Development Guide. It contains almost all of the previous Knowledge Base information as well information on setting up your database files for access.
FileMaker Go is available in two versions: FileMaker Go for iPhone and iPod touch (requires iOS 4.0), and FileMaker Go for iPad that makes use of its larger screen. Go get it! (see what I did there
)
Contract post ▲
by Chad Novotny on Jul 14, 2010,
filed under: Announcements
UPDATE: If you missed today’s webinar, a recording should be available shortly. We’ll update this post once it goes live. Thanks to all that attended!
*****
FileMaker Pro makes it easy to create solutions to implement logic, automation, and business rules. Google Apps - the suite of applications for email, contacts, calendars, documents, etc. - makes it easy to set up an organization with back-office IT systems. For those that use both tools, linking the two together is a natural wish.
On Wednesday, July 28th, yours truly will be presenting a special DevCon 2010 session PREVIEW web seminar, FileMaker and the Cloud: Integrating with Google Apps, hosted by FileMaker, Inc. I’ll be discussing some of the reasons The Support Group switched to Google Apps, and how we continue to use our FileMaker solutions with data stored “in the cloud.” I’ll explore the challenges of using API’s designed for web applications, and demonstrate authenticating and adding and retrieving “records” from Google Apps through a FileMaker interface.
Registration is limited so please register for ONLY one web seminar.
For more sessions like these, be sure to attend the FileMaker Developer Conference, August 15-18 in San Diego, California. Register today: http://www.filemaker.com/devcon
by Chad Novotny on Jun 30, 2010,
filed under: Announcements
FileMaker has released the v2 updater for FileMaker Pro 11, FileMaker Pro 11 Advanced, FileMaker Server 11, and FileMaker Server 11 Advanced.
There are the usual number of bug fixes, as is to be expected, as well as a small but important change in behavior. If you’re using variables in merge text on your layouts, variables without values will now appear empty. In FileMaker Pro 11v1, empty merge variables would instead appear with the name of the variables, such as:
Total Invoices: <<$$invoiceSum>>
You can read more about the various issues addressed in FileMaker’s release notes for Pro and Pro Advanced, and Server and Server Advanced.