ISO FileMaker Magazine: FileMaker Video Tutorials, Templates, Help & More

Navigation

Easier Development

Click this video (use the full screen or click to go to YouTube) to see what you may be missing in your copy of FileMaker Pro! I don't develop without it!

Tools & Resources

News & Blogs

Exceptions in Visualforce

Soliant Consulting Blog - Mon, 05/20/2013 - 12:49pm
Are DML changes rolled back when an exception occurs in Visualforce?

It is clear from the official Salesforce documentation that all database modifications initiated from a trigger are rolled back when an exception occurs. We can look at it as if the application server started a transaction in our behalf, and handled the roll back if an exception is thrown and is not handled.

But, what happens with exceptions in VisualForce?

From reading some of the documentation, it may not be as clear how the application behaves when an exception occurs as a result of a VisualForce interaction. Are DML changes rolled back when an exception occurs as a consequence of a VisualForce request? Well, it turns out it’s pretty easy to test it, so I went ahead and did that.

I used just two components for my test:

  1. A VisualForce page
  2. A Controller for our VisualForce page

This is the code for the VisualForce page:

This is the code for the Controller:

The only thing that the VF page does is call the throwException method when the user clicks on the “Click Me” button.

In the throwException method the second insert fails because the name field is required when creating a pricebook.

If you look at the database state after clicking the button, you will see that neither insert went through. (You can comment out the second one to make sure the first one works.)

So from our test it is clear that VisualForce pages display the same behaviour triggers do, and that all database changes are rolled back when an exception occurs.

This behavior is consistent with the way exceptions are handled everywhere else, and we could imagine that internally Salesforce is using something like Java filters for establishing transaction boundaries, in a fashion similar to how it’s done in the Spring framework.

Happy coding!

Salesforce.com Software Development Web Salesforce Salesforce Visualforce

Perfecting FileMaker Pro Recursion & Virtualization Part 2

Excelisys Excetera about FileMaker - Tue, 05/07/2013 - 4:09pm
A Wrinkle in Timeliness Pt 2 – Perfecting FileMaker Pro Recursion & Virtualization, by Andy Persons of Excelisys

Perfecting FileMaker Pro Recursion & Virtualization Part 2 explores the use of recursion and virtualization (through global variables) in solving complex data interconnectivity challenges using FileMaker Pro 12 in a multi-user client-server environment. Using a specific case study of an Excelisys project/client in the medical manufacturing industry, Andy discusses and demonstrate the dramatic performance benefits that can be gained with the techniques involved.

Have you ever had a FileMaker Pro project where each task depended on other tasks to be completed before it could start? How would you keep track of the projected completion date of the project as various tasks were completed or delayed? What if the project involved hundreds of tasks and tens of thousands of dependencies?

In my previous post, I introduced the challenge: Updating hundreds or thousands of tasks interconnected with tens of thousands of connections. We also took a look at a couple possible solutions, but determined that they were unworkable. In this second installment, we look at an alternate recursive approach and why it is superior to the one we discussed last time. Let’s take a look at this other possibility shall we…

Sample of free PDF download

Please visit the Excelisys Tips-n-Tricks section of the website to download the article in its entirety as a PDF.

Andy Persons is a Lead Senior FileMaker Pro Developer with Excelisys:  Andy has been an industry leading FileMaker Pro developer creating FileMaker Pro solutions for over 17 years. In addition to being one of the lead developers of three top-rated and most-downloaded FileMaker Pro solutions of all-time; the FileMaker Business Tracker and the Excelisys eX-BizTracker & eX-BizTracker Pro jump-start solutions, he has shared his incredible and advanced talents by authoring numerous Tips-n-Tricks files and white papers, including Hierarchical Portals, Recursive Calcs, Audit Logs and Drag-and-Drop using FileMaker Pro.

*This article is provided for free and as-is, use and play at your own risk – but have fun! Excelisys does not not provide free support or assistance with any of the above. If you would like help or assistance, please consider retaining Excelisys’ FileMaker Pro consulting services.

* FileMaker and FileMaker Pro are registered trademarks and owned by FileMaker, Inc. in the US and other countries.

Accessing a hosted FileMaker database without file references

Soliant Consulting Blog - Mon, 04/29/2013 - 2:01pm

Recently, I've discovered a way of sending  and recieving data to a hosted database on FileMaker Server without hard coded file references using the FileMaker Script Protocol.  This may come in handy if you have applications with remote users over the WAN and the server may change.  Here's the basic teqnique:

  1. You can use insert from URL with xml such as "http://user:pw@serveraddress/fmi/xml/fmresultset.xml?-db=opportunity.fmp... & opportunity::__kp_OP_ID & "&-find" to get the data for a record on the server (be sure to use SSL if you are going to use an account in the URL string).
  2. Parse the results of the insertURL script step and put them into a scratch table.  You can now compare the local data with data on the server.
  3. You can update the results on the server by passing parameters with the FileMaker script parameter using something like this: "FMP://user:pw@yourserver/opportunity.fmp12?script=UpdateDataFromRemote&param=<kp>" & opportunity::__kp_OP_ID & "</kp>" & $fields
  4. In FielMaker go, you can then update the scratch table with the new contents from the server by calling a local FileMaker script with parameters: "FMP://~/opportunity.fmp12?script=SetFromWeb&param=" & $$fields

Has anyone else been using the FileMaker script parameter like this?   How well has it worked for you?

 

Web Mobile Database FileMaker FileMaker Script Protocol Sync FileMaker Database

A Wrinkle in Timeliness – Perfecting FileMaker Recursion & Virtualization

Excelisys Excetera about FileMaker - Fri, 04/12/2013 - 12:32pm

A Wrinkle in Timeliness – Perfecting FileMaker Recursion & Virtualization, by Andy Persons of Excelisys

A Wrinkle in Timeliness Pt1 of 4 – Perfecting FileMaker Recursion & Virtualization, by Andrew Persons explores the use of recursion and virtualization (through global variables) in solving complex data interconnectivity challenges using FileMaker Pro 12 in a multi-user client-server environment. Using a specific case study of an Excelisys project/client in the medical manufacturing industry, Andy will discuss and demonstrate the dramatic performance benefits that can be gained with the techniques involved.

Have you ever had a project where each task depended on other tasks to be completed before it could start? How would you keep track of the projected completion date of the project as various tasks were completed or delayed? What if the project involved hundreds of tasks and tens of thousands of dependencies? In this first installment, we take a look at a couple of potential approaches on how you can tame that complexity and update every task in the project within seconds.

Please visit the Excelisys Tips-n-Tricks section of the website to download the FREE PDF.

Andy Person Article on FileMaker pro 12 Recursion and Virtualization

 

Andy Persons is a Lead Senior FileMaker Pro Developer with Excelisys:  Andy has been an industry leading FileMaker Pro developer creating FileMaker Pro solutions for over 17 years. In addition to being one of the lead developers of three top-rated and most-downloaded FileMaker Pro solutions of all-time; the FileMaker Business Tracker and the Excelisys eX-BizTracker & eX-BizTracker Pro jump-start solutions, he has shared his incredible and advanced talents by authoring numerous Tips-n-Tricks files and white papers, including Hierarchical Portals, Recursive Calcs, Audit Logs and Drag-and-Drop using FileMaker Pro.

*This article is provided for free and as-is, use and play at your own risk – but have fun! Excelisys does not not provide free support or assistance with any of the above. If you would like help or assistance, please consider retaining Excelisys’ FileMaker Pro consulting services.

* FileMaker and FileMaker Pro are registered trademarks and owned by FileMaker, Inc. in the US and other countries.

Productive Computing Acquires Adatasol's FileMaker Hosting Services

FMPro.org FileMaker Portal - Thu, 04/04/2013 - 11:18am
Productive Computing, Inc., a Platinum member of the FileMaker Business Alliance, today announced the acquisition of Adatasol's FileMaker hosting services.  Under the terms of the agreement Adatasol, Inc. turned over their FileMaker hosting services to PCI on March 12th.  Over the next three months PCI will be integrating those customers into their hosting and SaaS server infrastructure which is located in key data centers across the U.S... - (Productive Computing Inc.)

Creating User Specific Reports Using FileMaker Pro Privilege Sets

FMPro.org FileMaker Portal - Wed, 04/03/2013 - 2:51am
If you've ever wanted to generate specific reports for different groups of users, but are intimidated by FileMaker's, somewhat complicated security schema, this PDF shows you an alternative methodology that is very simple and easy to implement, using FileMaker Pro privilege sets... - (Excelisys)

CNS Image 1.6 Released -- Big update

FMPro.org FileMaker Portal - Tue, 04/02/2013 - 12:22pm
Comm-Unity Networking Systems releases a new version of CNS Image with some major updates. The big change in version 1.6 is an update to the latest version of ImageMagick bringing in almost two years of improvements to the image manipulation library. This version also has several other bug fixes and enhancements... - (Comm-Unity Networking Systems)

Creating User Specific Reports Using FileMaker Pro Privilege Sets

Excelisys Excetera about FileMaker - Fri, 03/29/2013 - 12:27pm
Creating User Specific Reports Using FileMaker Pro Privilege Sets

If you’ve ever wanted to generate specific reports for different groups of users, but are intimidated by FileMaker’s, somewhat complicated security schema, this PDF shows you an alternative methodology that is very simple and easy to implement, using FileMaker Pro privilege sets.

Recently a client, a large bail bond company, wanted to be able to add reports easily, that could only be viewed by specific employees, and without having to go anywhere near FileMaker’s security schema.

This got me thinking outside the box, which is where many good FileMaker solutions come from, and I started to play a game of ‘What If?  What if we could use a related value list to populate a field, listing all the reports that were available for the user, and then use a script trigger to generate the report?  Once I’d finished playing ‘What If?’, I started a different game; ‘Why Not?”  (Both of these are fun games that I love playing and which FileMaker is particularly adept at).

As it turned out the solution was very simple and easy to implement.  We just had to add one table (for the report names), a global field (with a related value list) and a script with  just 3 steps.  Now all the client has to do in order to add new reports is to add a new layout and make sure that the name of the layout is the same as the name of the report and then select who can read that report.

Problem solved; mission accomplished; happy client.  What could be better? Download this FREE PDF from Excelisys’ Tips-n-Tricks section of the website.

- Michael Rocharde, Lead FileMaker Developer @ Excelisys.

Michael Rocharde has been a professional FileMaker Developer since 1987. He has worked with Excelisys since 2002 and has had more than 40 articles published in a variety of magazine He is also the author of FileMaker & Me, an interactive multimedia book focusing on FileMaker Interface Design. Available only for the iPad, this book is available at the iTunes store.

Michael recently released a free reference guide to FileMaker 12’s Themes (Themes Ain’t Wot They Used to Be). Currently Michael is working on a new book ‘FileMaker & You’, Tips & Tricks for Successful FileMaker Development’ (To be published May 2013) for beginners to intermediate developers who, typically, are working in-house and who are being tasked with building a FileMaker solution to manage a specific task or function.

Michael lives in the south of France, just outside of Toulouse in a small village called Castelmaurou. When he’s not developing FileMaker solutions or writing, he can be found tearing out what little hair he has left trying to master the French language.

* FileMaker and FileMaker Pro are registered trademarks and owned by FileMaker, Inc. in the US and other countries.

Dynamically Filtering Filtered Portals

Soliant Consulting Blog - Fri, 03/29/2013 - 9:44am

I had the opportunity to play with filtered portals yesterday! (I split my time between Salesforce and FileMaker, and it's been a while since I've had a project where I get to play with these. Please pardon my enthusiasm, but this is FUN.)

I needed to set up a dynamic filter using a global field, and decided to try incorporating it into the portal filter definition rather than proceed as I normally would and incorporate the global into my relationship.

I'm pleased as punch with the result. I now have a tiny script called via trigger, and can bop-bop-bop around the solution and apply these dynamic filters to all of the portals on all of the dashboards the user has requested without touching my relationship graph.

Let's look!

Here's a simple shot of what I want:

The user can type anything they want into the Filter field, and the system will match on any part of any word on any field in the results in the portal. (Instantly and without effort, of course.)

Idea 1: stick the filter logic into the portal definition. Easy enough! Here's what that looks like:

...and the logic, allowing for the filter to be empty as well:

 

SES__Session::Filter_Deals_g = ""

or

PatternCount ( SES_FND__Fund::Nickname ; SES__Session::Filter_Deals_g ) > 0

or

PatternCount ( SES_FND__Fund::Status ; SES__Session::Filter_Deals_g ) > 0

or

PatternCount ( SES_FND__Fund::Rating ; SES__Session::Filter_Deals_g ) > 0

 

But it wasn't instant. Or frankly responsive in any way.

A quick Google and the FileMaker community reminded me that I need to flush the cache. (Thanks, fmforums.com!) (And perhaps I shouldn't code in the middle of the night.)

On my way to that answer, I came across another great tip from a commenter on filemakerinspirations.com: using Set Field to set a field within the portal to itself -- rather than Refresh Window (flush joined cache results) -- will reduce screen-flash for our PC-using friends.

I have to confess that PC users are more of an afterthought for me because I'm evidently a self-centered, self-indulgent Mac user. So I'm pleased when I can incorporate something for them pre-emptively rather than reactively.

So, the simple script, in English:

  1. Commit Records (so the changes the user makes to the global are recorded)
  2. Set a field in the portal to itself (shortcut to essentially refresh the cache)
  3. Go back to the filter field so the user doesn't notice the system doing anything

Because I'm going to be applying this all over the place, though, I needed to abstract it a bit. With the help of a nothing-fancy custom function to parse my parameters (which you can check out in the attached sample file), here's the final script:

(Here's the sample file if you want to see it in action: FilteredPortals.zip)

I admit that setting the $param variable is unnecessary, but I get itchy if I type "Get (scriptParameter)" more than once, so setting that variable is a little reflexive at this point.

And yes, the script comments are longer than the script itself. That's how simple it is!

Other keys: if you abstract the script like I did, remember to give an object name to the global filter so you can pass it into the script and navigate back to it after refreshing the portal.

Overall Benefits:

  • Will filter based on any part of the word (or phone number)
  • Super-simple to implement across the solution

Overall Risks:

  • I'll need to see what the performance is like. It's acceptable for me now over a remote connection a couple states away, but our nascent file has all of 10 records in it. Filemakerinspirations.com has some tips on (legal) performance enhancement, so I may be testing those out next. (I like the idea of using an OnTimer script to delay the "instant" calculation until fast typers have paused for .3 seconds.)
Database FileMaker filtered portal dynamic filter FileMaker FileMaker 12

HierarchyLite - FileMaker Pro 12 Tips and Tricks Demo

FMPro.org FileMaker Portal - Mon, 03/25/2013 - 2:49am
Another FREE FileMaker Pro 12 Tips and Tricks Demo file showing an even more simplified approach to hierarchal portals by Doug West, Product/Project manager of Excelisys.  Doug has now made this advanced technique, originally developed by our own Andy Persons, even easier... - (Excelisys)

Fun with PHP, Spirals and Numbers

Soliant Consulting Blog - Mon, 03/25/2013 - 2:00am

I was watching Vi Hart (http://vihart.com/) play with prime numbers in a spiral a few months back and that inspired me to do some number experiments of my own.

My first goal was just to generate a spiral of numbers. It wasn't too difficult to code a two dimensional array, find the center and start plotting numbers in the appropriate cell. My app builds spirals up and to the right, but it would be quite simple to have it go a different direction. As an example, a 3x3 array after being filled with the spiral can be imagined like this:

8 1 2
7 0 3
6 5 4

5x5:

24  9   10  11 12
23  8   1    2   13
22  7   0    3   14
21  6   5    4   15
20 19  18  17 16
 

Ok, so this isn't that interesting so far. So I decided to have it plot repeating sequences instead of just counting up endlessly. For example, I could plot 012 over and over and my 3x3 would then look like this:

2 1 2
1 0 0
0 2 1

5x5 with 01234 as sequence:

4 4 0 1 2
3 3 1 2 3
2 2 0 3 4
1 1 0 4 0
0 4 3 2 1

When I got to this point, I could tell something interesting was happening with the numbers, but I couldn't really pinpoint it. I could tell there was some repeating patterning going on, but I couldn't see it. So I wrote a little code to color code the number cells.

For example, coloring all the cells with a 0 one color and all the cells with a 1 another. Ok, so I did a little more than color a cell. I used the php gd libraries to build an image, colored each of the cells with a shade of grey (0 = lightest to highest number = black) and then added some options to allow me to write the values into the cells as text or just leave them off.

Here's an example of a 5x5 grid with a five element sequence where the values have been written into each cell.

 

Let's take a look at what happens with different sequences. These are all 11x11 grids. Starting on the left, we plot a two digit sequence, then three and so on up to a ten digit sequence on the far right.
 

Here they are again without the numbers:

Coding more blocks into the array effectively "zooms out" on the spiral. Here are the same sequences at 21x21:

And again at 51x51:

 

Thanks for playing!

PHP php Art Image Generation

HierarchyLite – FileMaker Pro 12 Tips and Tricks Demo!

Excelisys Excetera about FileMaker - Fri, 03/22/2013 - 11:25am
HierarchyLite - FileMaker Pro® 12 Tips and Tricks Demo of a Simplified Approach to Hierarchal Portals!

Another FREE FileMaker Pro 12 Tips and Tricks Demo file showing an even more simplified approach to hierarchal portals by Doug West, Product/Project manager of Excelisys.  Doug has now made this advanced technique, originally developed by our own Andy Persons, even easier! “HierarchyLite” is an EXcellent FREE FileMaker Pro 12 Tips and Tricks demo file which outlines how to create those cool hierarchically organized portals in FileMaker Pro 12, similar to the Mac Finder’s list view or Window’s Explorer view.

The general idea of this simplified no-frills version is to make this desired effect a tad easier to implement. The hierarchy concept is achieved with fewer fields and featured without the potentially unneeded distractions such as the category field, portal row highlight, and drag-and-drop functionality for moving items between groups.

When you open the file there are instructions and explanations on how it all works and how you can incorporate this technique into your own fabulous solutions! So download this free FileMaker Pro 12 Tips and Tricks demo file from Excelisys’ FileMaker Tips and Tricks section of our website today and ENJOY!

Download Now!

* FileMaker and FileMaker Pro are registered trademarks and owned by FileMaker, Inc. in the US and other countries.

FileMaker Pro 12 Tips and Tricks Demo on creating hierarchy portals.

Linear Blue are proud to announce the merger of the SyncDeK & fmDataGuard product suite to our expanding product range

FMPro.org FileMaker Portal - Fri, 03/22/2013 - 9:02am
Linear Blue welcomes the WorldSync product suite and its former CEO to join its excellent development team. As one of the foremost Platinum members of the FileMaker Business Alliance, Linear Blue is proud to welcome Jason Erickson as its new CTO, alongside COO Darren Kayes and CEO Paul de Hallé, who has over 25 years experience in the FileMaker community... - (Linear Blue)

FmPro Migrator 6.97 Adds CakePHP2 to PHP Web Hosting Conversion Feature

FMPro.org FileMaker Portal - Fri, 03/22/2013 - 8:40am
California based .com Solutions Inc. has released FmPro Migrator Platinum Edition 6.97 with support for FileMaker Auto-Enter calculation fields and FM query operators when using the PHP conversion feature. This release also adds support for the CakePHP 2 framework providing improved functionality and performance... - (.com Solutions Inc.)

Troi Activator Plug-in 3.5 for FileMaker Pro 12

FMPro.org FileMaker Portal - Fri, 03/22/2013 - 4:58am
Troi Automatisering today announced the availability of Troi Activator Plug-in 3.5 for FileMaker Pro 12. Troi Activator Plug-in is a very powerful tool for triggering scripts across the network, even over the Internet... - (Troi Automatisering)
Syndicate content