AnsweredAssumed Answered

AppleScript 'every document whose' - does not honor 'ignoring case'

Question asked by danshockley on Jan 28, 2014
Latest reply on Apr 12, 2017 by danshockley

Summary

AppleScript 'every document whose' - does not honor 'ignoring case'

Product

FileMaker Pro

Version

12.0v4

Operating system version

Mac OS X 10.9.1

Description of the issue

When communicating with FileMaker via AppleScript, it is sometimes useful to reference a document by partial name match using AppleScript's command 'every document whose name contains SOMESTRING.' Apparently FileMaker does that name match on a strict case-matching basis. This remains true even when the command is wrapped with a block 'ignoring case' - which is incorrect behavior.

Steps to reproduce the problem

Have databases with similar names, but with different case patterns. For example: Invoices_A1, INVOICES_a2, and INVOICES_B.
Run AppleScript that SHOULD find the two documents whose names match (case insensitively) invoices_a:
tell application "FileMaker Pro Advanced"
     ignoring case
          every document whose name contains "invoices_a"
     end ignoring
end tell

Expected result

That should return TWO documents, because the 'whose' command should honor the 'ignoring case' block and ignore case when matching document names to the string.

Actual result

It instead returns none, because the 'whose' command is not honoring the 'ignoring case' block, but persisting in doing an exact-case match.

Exact text of any error message(s) that appear

None. This is a silent error.

Workaround

We have to abandon the efficient 'whose' command and instead get a list of EVERY document, then loop over that list and find those that match the string using plain vanilla AppleScript. This wastes time and essentially removes the ability to use the 'whose' command that FileMaker claims to support.

Outcomes