MightyData

FileMaker and WordPress Consultants

  • Company
    • About
    • Contact
    • Team
    • Artists
  • Services
    • Consulting
    • Development
    • Our Process
    • Coaching
    • Training
  • Results
    • Customers
    • Success Stories
    • Testimonials
  • Blog

FileMaker 12 Adds Native SQL Queries

April 27, 2012 by Anders Monsen 31 Comments

Probably one of the most talked about features in FileMaker Pro 12, at least from a developer perspective, is the new ExecuteSQL() calculation function. To users interacting with FileMaker records, this is largely a hidden feature. Yet this powerful new option impacts developers in several ways.

Previously, developers used plugins to expose the SQL underpinnings of FileMaker. Now, a portion of SQL has become native to FileMaker. This portion is limited to the “Select” statement. Those same plugins remain viable options for developers who seek to insert, update, or delete records.

The programming language SQL (Structured Query Language, see Wikipedia entry) centers on the query, or Select statement, to pull data from one or more tables. For developers new to SQL there are several books or internet resources available, yet the most concise and immediately useful tool is probably FileMaker’s own ODBC and JDBC guide.

The SELECT Statement

Starting with the most elemental of queries, and breaking down the Select query into multiple lines helps us visualize the different components of the query. We can then add more pieces as we master each section. We start with selecting a field from a table.

SELECT some_field_name
FROM some_table_name

It’s important to note that this statement selects the field name, not the value in the field. So if we said, “select Department from Contacts” we would get a list of all the departments in every record from the Contact table. You can also include mathematical operations or modify strings in the query. To count values you can use count(*) or count(field_name) for all records in the first instance, or only records that contain a value in the field_name.

The WHERE Clause

The Select statement works well in its basic fashion, but what we’re really after is the Where clause, combined with the ability to interact with multiple tables in one query. Rather than building complex relationships in the graph to accomplish the same result, we’re now able to solve this through SQL.

When FileMaker Pro 11 introduced portal filtering we were able to simplify our graph and remove several Table Occurrences, and now with ExecuteSQL the graph can focus more on pure relationships, as this function is context independent. We can query table occurrences from anywhere in FileMaker, without having to navigate to specific layouts or rely on additional table occurrence groups.

The next step along the SQL path is adding the Where clause and additional tables.

SELECT some_field_name
FROM some_table_name
WHERE a_condition_applies

The condition serves to limit the Select statement, as without it you would select all the records in the table. So, a simple Select statement with a Where clause would look like “select Department from Contacts where City = ‘Dallas'”.

ExecuteSQL Syntax

The way the ExecuteSQL function behaves plays a key role in writing SQL statements. According to the calculation dialog, the syntax is:

ExecuteSQL( sqlQuery ; fieldSeparator ; rowSeparator { ; arguments… } )

The sqlQuery is the query string – the select statement. Since this is text, we write this inside double quotes. The fieldSeparator and rowSeparator default to comma and return, so unless we need the result to appear in a different format we can simply use double quotes. The arguments is optional, but will be discussed further below. In this query we can count all the records in the state of Texas, using single quotes for the literal value of TX.

ExecuteSQL( "select count(*) from Contacts where State = 'TX'"; ""; "" )

Pages 55-57 of the ODBC guide list several reserved words. A few of these words might appear in your solutions as field names, such as “order” or “size”, or “First” and “Last” instead of FirstName or LastName (or NameFirst and NameLast). These words will need to be escaped in queries. In addition, field names with spaces also need to be escaped.

ExecuteSQL( "select \"Order\" from Orders where \"Product Name\" = 'FileMaker'" ;"";"")

Unlike MySQL, for example, the ExecuteSQL function will show just ? in the result if there is an error in your query, with no hint as to what caused the error.

Using the Arguments Parameter

The arguments option allows the use of multiple arguments in the sqlQuery string. These arguments use the question mark as a placeholder, and are then listed in order in the argument section.

ExecuteSQL( "
select count(*)
from Books
where zkf_authorID = ?
and  datePublished < ? ;
""; ""; Author::zkp_AuthorID ; Get( CurrentDate ) – 365)

Rather than using conditions outside the current record (i.e. State = ‘TX’), here we input values from a specific record, to see which books were published within a year for the author of the current book record.

The FROM Clause

The ability to consider multiple tables falls under the From clause, but also in this action we must point back to the fields in the Select clause. These fields can be prefixed with the table name or alias. Adding an alias is useful as it reduces clutter in the query. With a table called Customers we can change this to from Customers C, and prefix the field as C.NameFirst in the Select statement. To query across multiple tables we “join” these with an equal sign (=), which will include only matching rows in the results.

SELECT C.NameFirst, C.NameLast, O.DateOrdered
FROM Customers C, Orders O
WHERE C.custID = O.custIDf

Wrapping Up

The new ExecuteSQL function opens up a multitude of possibilities. In scripting you can build queries across tables, populating variables for use in virtual list techniques. In charting you can gather data for dashboards in the same way, without having to jump to various different layouts and loop through records to summarize them. For tooltips you can provide information specific to the current record that looks across related tables. All this can be accomplished without adding a single new table occurrence.

Filed Under: Calculations Tagged With: ExecuteSQL, FileMaker 12, Performance

Top 12 Benefits for Upgrading to FileMaker 12

April 24, 2012 by Darren Burgess 9 Comments

Now that the excitement surrounding the FileMaker 12 product line launch is beginning to wane, developers, users and business owners are faced with the issues surrounding the why, when and how of upgrading to the new version. This new version is the first in 8 years to implement a new file type – .FMP12. The complete FileMaker 12 product line is not backward compatible with previous versions. So, to put it bluntly, there is no going back once you upgrade your server and database to FileMaker 12, and your entire database environment (server, clients and mobile clients) has to be upgraded at the same time.

The good news is that this new version brings some dramatic new features that will surely drive value and make the challenges of upgrading your database environment well worth the effort and investment. Here is our take on the perennial top 10 list.

The Top 12 Reasons for Upgrading to Filemaker 12

(with a few caveats…)

  1. Charting Enhancements – FileMaker Charting has been enhanced with the addition of 5 new charting types and an improved user interface. Creating dynamic charts of your FileMaker data is now easier than ever.
  2. FileMaker Go 12 is FREE – We think it was a great move by FileMaker to offer its mobile solution for free in the Apple iTunes Store. Customers and developers can now more easily test and deploy mobile database solutions.
  3. Window Styles – This is a feature added to the New Window script step.  Developers can now specify Advanced Styles when executing this script step which allows some control over window behavior.  Windows can be specified as a document, floating document or modal dialog and window controls (close, minimize, maximize, zoom, resize) can be turned on or off.  We like this feature as it captures window control features that formerly had to be scripted.
  4. Layout Themes – 40 stunning new layout themes can be instantly applied to a layout to update its look and feel.  This new feature allows developers to quickly create attractive layouts without having to build from scratch.  Caveat – 12’s new themes are not a panacea for layout design and modification.  Themes cannot be applied across multiple layouts at once, nor can they be applied to layouts from a converted solution.  We believe the best practice in working with themes when starting a new solution will be to use themes to create a default form and list view and then copy those layouts to create the rest of the solution.
  5. Layout Guides – Users of Adobe InDesign will absolutely love this feature.   In layout mode, alignment guides appear when moving and resizing objects to indicate their relative alignment to other objects. Now, creating pixel-perfect layouts will be faster and more effortless.  Of course, we still have the position elements in the inspector to assist in creating precisely designed layouts.
  6. New Layout Design Elements – We believe that if you are going to be spending a lot of time in your workday looking at an application, it ought to look really good.  FileMaker 12’s new design elements go a long way to making that possible.  Now developers can create layout objects with a customizable corner radius; gradients with multiple colors and direction; and buttons that change appearance by behavior (normal, in focus, hover, pressed).
  7. Server 12 is 64-bit – Re-built on the 64-bit architecture, FileMaker Server can now use more RAM (up to a terabyte) and can be configured to use half of the available RAM for cache. Now, FileMaker Server can take full advantage of current high-speed server technology, delivering better performance to FileMaker and FileMaker Go clients.
  8. Incremental Backups on FileMaker Server – Not only will your database perform better on FileMaker 12, your data will be more secure with adoption of more robust backup system. FileMaker Server 12 and Server 12 Advanced now allow incremental backups that allow for more frequent backups with far less impact on user experience during the backup process.
  9. Enhanced Container Fields – FileMaker 12’s enhanced container fields now include drag-and-drop support, audio and video recording, and media streaming (in conduction with FileMaker Server).  We are especially excited about the new external storage features of container fields.  All container field media can now be externally stored in a server directory managed by FileMaker server.
  10. FileMaker Go Enhancements – FileMaker Go 12 brings new features making your mobile solution more versatile and powerful:  users can now record video and audio directly into container fields and export data.  New location functions now allow developers to rapidly create location-aware mobile database applications.
  11. ExecuteSQL Function – Now, FileMaker 12 can query data internally using the ExecuteSQL calculation function.  This function is context independent, so data can be queried regardless of what layout/table occurrence you are in.  In previous versions, developers had to create many additional table occurrences on the relationship graph and create hidden utility windows in order to leverage certain functionality in the database.  With the ExecuteSQL function data can be queried (even from unrelated tables) anywhere there is a calculation dialog.  FileMaker solutions will be cleaner, more efficient and faster to develop.  Caveat – just SQL Select statements are possible for now.  Developers who require Update and Delete SQL statements will continue to use SQL plugins.
  12. File Conversion – Simply put, converting your FileMaker 7 – 11 solution is as simple as opening your old files with FileMaker 12. The FileMaker conversion engine does the rest, and from our experience testing, there are few issues to be concerned about.

Questions? We are excited to help new and current customers migrate to the new version of FileMaker. Contact us today to learn more about how you can take advantage of the new features.

Filed Under: Layout Design Tagged With: FileMaker 12, FileMaker Go

12 Days of FileMaker 12: FileMaker Go Enhancements

April 23, 2012 by Kirk Bowman Leave a Comment

FileMaker 12 "touch" themes for iPhone & iPad

The first and most important new feature is that FileMaker Go 12 is now free. It is truly a game changer. Anyone with an iOS device can now give it a test drive. FileMaker Go 11 is still available as a paid app, so there is more incentive to move to FileMaker 12.

New Features in FileMaker Go 12

  1. Starter Solutions – Several features in FileMaker 12 make it easier to design screens for the iOS. There are sixteen starter solutions, each with layouts for iPhone and iPad. Four solutions are installed by default with FileMaker Go 12: Assets, Contacts, Content Managements and Tasks. FileMaker Pro 12  has screen stencils with the specific dimensions of the iPhone and iPad in portrait and landscape mode.
  2. Layout Themes – There are 40 new layout themes, five specifically designed for iOS: Cool Gray Touch, Onyx Touch, Ocean Touch, River Touch and Wave Touch. They have larger fonts and objects ideal for touch screen devices.
  3. iOS Multitasking – Multitasking has significantly improved in FileMaker Go 12. In earlier versions, FileMaker Go had to terminate when it went to the background. Now it goes into a suspended state, which means it will resume much faster when it comes back to the foreground. The fmreauthenticate extended privilege gives you more control over when a user has to re-login after the app goes into the background.
  4. Exporting – FileMaker Go 12 includes support for exporting records directly in the iOS. You can create tab-delimited, CSV, DBF, HTML and Excel (XLSX) files to email or open directly on the device. It can also read and write Snapshot Link files. Snapshots allow you to save a state of the database (current layout, found set, record, sort order) and share with another user who also has access.
  5. Charting – Charting functionality is much better in FileMaker 12. It is great for creating management dashboards for mobile solutions. In addition to bar, line and pie charts, FileMaker 12 now has  Scatter, Stacked Bar, Positive/Negative, and Bubble charts.
  6. Container Fields – Container fields offer more functionality across the entire FileMaker 12 product line. FileMaker Go 12 can access remote container data managed by FileMaker Server. It can view streaming and interactive content like video and PDF files. Interaction with the content on the iPhone/iPad includes access to the camera and photo library, recording audio, capturing a signature and viewing multiple file types (PDF, Excel, etc.).
    FileMaker Go 12 container menu
  7. Location Functions – FileMaker Go 12 includes two new calculation functions to work with location information oniOS devices. Note, these functions only work withiOS devices.
    • Location ( accuracy { ; timeout } ) will return the latitude and longitude for the device.
    • LocationValues ( accuracy { ; timeout } ) will return latitude, longitude, altitude, accuracy and age of the data.
  8. Get Functions – Other calculations (some old, some new) for working withiOS solutions include:
    • Get ( SystemPlatform ) – Returns the operating system for the device
    • Get ( ApplicationVersion ) – Returns the version of FileMaker Go (iPad or iPhone/iPod Touch)
    • Get ( PersistentID ) – Returns a unique identifier for the computer or  device
    • Get ( ConnectionState ) – Returns whether FileMaker Server is using a secure connection (SSL)
    • Get ( UUID ) – Returns a universally unique identifier useful for primary keys

FileMaker Go Training

These are just some of the features I covered in this session from the 12 Days of FileMaker 12.

Filed Under: Layout Design Tagged With: 12 Days of FileMaker 12, FileMaker 12, FileMaker Go, Video

12 Days of FileMaker 12: Quick Table View

April 23, 2012 by Susan Fennema Leave a Comment

Table View might just be one of the least appreciated features in the FileMaker Pro product line. True, it has hardly changed in versions 7 through 9, and the changes in 10 were welcome but fairly simple.

Table View in FileMaker Pro

All that changed in 11 with the addition of two bold new features that allow a developer to create a table quickly and perform summary analyses, all without ever leaving the comfort of browse mode. FileMaker 12 brings welcome refinements to this important family of features and makes Table View a tool worthy of a fresh look.

In this session from the 12 Days of FileMaker 12, we explore practical uses of Table View and showcase changes to it.

About Mark Richman

Mark Richman is the CEO and founder of Skeleton Key, a FileMaker Business Alliance Platinum level member based in St. Louis, Missouri. He leads a team of Certified Developers and an IT consulting division in providing multi-platform development and technology consulting for customers in a broad array of markets.  He is certified in FileMaker versions 8 through 11 and an Authorized FileMaker Trainer.

When Mark isn’t running his company or wrestling with his four sons, you can find him writing TechNet articles for FileMaker Inc.; speaking at the FileMaker Developer Conference; or evangelizing about how to get the best performance out of your FileMaker application.

Filed Under: Layout Design Tagged With: 12 Days of FileMaker 12, FileMaker 12, Layout objects, Video

12 Days of FileMaker 12: Container Field Enhancements

April 23, 2012 by Kirk Bowman Leave a Comment

FileMaker Pro 12 brings a new storage method for container fields. This session from the 12 Days of FileMaker 12 introduces developers to the new storage method from a practical usage point of view as well as from a technical point of view.

Container Enhancements in FileMaker Pro

Topics in this video include:

  • Manage Containers option
  • Thumbnail generation
  • Secure container storage
  • Remote data transfer
  • Inspector options
  • Insert File script step
  • Converting older databases

About  Tim Neudecker

Tim Neudecker is a leading software engineer who has over 20 years’ experience as a professional FileMaker developer. He spent over ten years as an in-house developer for companies such as Macy’s/Bloomingdales and AGA. In 2003, he joined KyoLogic as co-founder and CTO.

Tim has presented four times to the FileMaker Developer Conference on topics including security, system performance and developer tools. He has published articles in FileMaker Advisor on system integration and performance tuning. In 2003, he was honored with a FileMaker Excellence Award for his contributions to the developer community.

Filed Under: Rapid Development Tagged With: 12 Days of FileMaker 12, Container fields, FileMaker 12, Performance, Video

12 Days of FileMaker 12: Layout Mode Enhancements

April 16, 2012 by Susan Fennema Leave a Comment

FileMaker 12 provides powerful new features to align, position and manage objects on your layouts.In this session from the 12 Days of FileMaker 12, see how these powerful new features will help you design more consistent and graphically pleasing application.

Layout Enhancements in FileMaker Pro

This video walks through a review of the new features and how they can be used to balance your layout designs and improve workflow.

About John Mathewson

John Mathewson is President and co-founder of KyoLogic a custom software development firm in Westport, Connecticut.  He is an organizational design expert and works to create systems that improve productivity and increase business intelligence. Since 1986, John has developed database applications in Visual FoxPro, MySQL and FileMaker Pro. He is a certified FileMaker 7, 8, 9, 10 and 11 developer.

Filed Under: Layout Design Tagged With: 12 Days of FileMaker 12, FileMaker 12, Layout objects, Video

12 Days of FileMaker 12: Layout Design Surface

April 9, 2012 by Susan Fennema Leave a Comment

When designing new modules or systems, one bottleneck to the turnaround time involves the development of interfaces. The layout design surface of FileMaker Pro 12 has given us tools to streamline interface development, revamp layout themes, and additional control of objects with the Inspector.

Layout Design Tools in FileMaker Pro

In this session from the 12 Days of FileMaker 12, we explore examples of these new layout design tools.

About Sameer Khan

Sameer Khan is the presenter. He is a FileMaker 9-11 Certified Developer and Authorized Trainer employed by Anvil Dataworks, a development firm outside of Washington DC. He has been working with FileMaker for over eight years. His students say that he is an interesting person and a knowledgeable teacher.

Filed Under: Layout Design Tagged With: 12 Days of FileMaker 12, FileMaker 12, Layout objects, Video

12 Days of FileMaker 12: Charting Enhancements

April 9, 2012 by Kirk Bowman Leave a Comment

A picture is worth a thousand words; a chart is worth 10,000 records. In version 11, FileMaker introduced the ability to chart your data natively. In this session from the 12 Days of FileMaker 12. we explore the changes made in the charting engine of FileMaker 12.

Charting Enhancements in FileMaker Pro

This video uses real solutions to enhance the existing charts. In addition, we will review the new chart types and under what scenarios they would be useful.

About Jerry Salem

Jerry Salem began his career in technology as a computer science major, eventually moving to the biological sciences where he earned his Ph.D. in Biochemistry. During that time, he published papers on malaria, tuberculosis, and AIDS. He holds a U.S. patent and has spoken internationally on numerous topics.

As a researcher, Jerry learned computer networking, web design, and FileMaker. He has worked in various technology fields developing a number of solutions, including electronic medical records software and complex systems for many businesses and organizations. Along the way, he has mastered standard SQL tools and a variety of other technologies.

Since 2007, Jerry has worked at IT Solutions, a Platinum level member of the FileMaker Business Alliance. Among his accomplishments since joining ITS are certification in FileMaker versions 8 through 11 and frequent contributions to the Philly FileMaker User Group.

Filed Under: Layout Design Tagged With: 12 Days of FileMaker 12, FileMaker 12, Layout objects, Reporting, Video

  • « Previous Page
  • 1
  • 2
  • 3
  • Company
  • Services
  • Results
  • Blog

Copyright © 2026