Experiences of a FileMaker Pro Database Developer

Import Fails on FileMaker Server

Yep, it got me last night. I wrote a script to import data into a reporting system (post coming soon on optimizing reporting). It worked fine on FileMaker Pro client, but failed when I implemented the script to run server-side. I thought I would add the routine to the nightly updates so any changed or new entries would automatically get updated into the Report System overnight. It’s all part of optimizing reporting so the user doesn’t have to wait for large updates to run when generating a report, only changed or new data.

So, why did it fail? FileMaker Server can’t import from one table to another when the files are hosted. Bummer and I forgot this. I’ll be re-writing the script to follow an export and import routine. Steven Blackwell and Wim Decorte wrote a great post on Server Side Import and Exports that I’ll be sure to follow. It helps clarify what can and can’t be accomplished. For the knowledge base article on the subject, check out ID 7035.


Post to Twitter

Annoying Windows Flash

Ever notice when a record is refreshed there is an annoying flash when using FileMaker in Windows? The Refresh Window command only refreshes data. It does not redraw the screen. However, under Windows, whenever the data is refreshed an annoying flash occurs, especially when the window is not maximized. There are many situations where we need the data refreshed and updated, but there has been no way to prevent the flashing.

Good news, with FileMaker 11 the Freeze Window script step updates the screen without the flashing. Just add a Freeze Window script step whenever you need data refreshed within your scripting. As long as you do not need to Flush cached join results or Flush cached SQL data, then use Freeze Window instead of Refresh Window.

When a script ends that has a Freeze Window step in it, and a Refresh Window step was not used after the Freeze Window, FileMaker Pro automatically refreshes the screen. I find this quite interesting that this particular refresh window will not cause the window flashing. Here’s hoping that FileMaker will fix the flashing caused by the Refresh Window command in the near future.

Special thanks to Darren Terry, Jason DeLooze and Howard Schlossberg for helping me clarify, test and sort this out.

Post to Twitter

Working Around Table View Limits

After digging a bit, I found the Table View column limits and I see they have not changed. FileMaker Pro is limited to 99 fields/columns. I wish this information was somewhere else besides the Technical Specifications. In the help, it would be nice to see it listed under the “Working with data in Table View” subject. Searching the KB is just about pointless, but maybe I don’t understand the search logic. I found my answer in a google search, then I was able to find it in the KB once I knew the KB number. For FileMaker 11, it’s KB #7541.
This limit is also based on the layout width. The limit can be less that 99 if the layout width is at or near the max of 110 inches (7,920 pixels). However, this is also inconsistent. I have a Table View Layout with just 79 fields and the layout width is 89 inches. I had to decrease the column widths just for the newly added fields to show up on the layout and in the Modify Table View window. It would at least be helpful if when you add the field via the Modify window, they were grayed out or somehow indicate they are not visible and cannot be displayed on the layout.
If you’re missing fields in Table View, try decreasing the column widths and see if they show up.

Post to Twitter

Prevent Error 101, Server-Side

When running a script to loop through records and you have the Exit after last checked, you get a 101 error message, record is missing. I “understand” this is supposedly expected behavior, however to me it’s an erroneous error since you have the box checked to exit after last. It’s kind of like “duh, I know the next record is missing, that’s why I’m exiting this loop.”
This is a problem when running the script server-side. The schedule indicates an error and the log viewer shows “FileMaker Script Error.” The script actually performed OK and was successful, but reported the 101 error and shows the error status.
I tried trapping for error 101 and then just exiting the script, but the error was still reported to the FMS log and displayed in the Schedule Window as “FileMaker Script Error.”
The only way around the error is to put a condition to check if you are on the last record, something like:
Exit Loop If [Get ( FoundCount ) = Get ( RecordNumber )]
Put this exit loop condition right before the Go To Next Record script step.

Post to Twitter

How do you “fit” report layouts to a page?

There is no easy way to scale FileMaker layouts, and this is a huge nuisance especially when you have to add a field to a report that has already been tweaked to fit the page just right. Scaling in page setup is not always an option, especially between cross platforms and using a variety of printers.

I’m wondering how long we have to wait to have a decent printing option that will autoscale reports we design to fit to a selected page? Acrobat and Apple’s Preview do a nice job…

I usually end up manually re-formatting the layout, decreasing point size, condensing type, stacking lines, etc. I think less is more, but as we all know that’s not what the client always wants. They want to see it “all” on one report.

In some cases, I’ve been able to scale consistently in page setup and then save as a PDF, open in Acrobat or Preview and print to fit to page from there. Just another work-around.

Post to Twitter