Over 46,000+ Business Solution Developers Find answers, ask questions, and connect with our community of business solutions developers, business owners and partners.
Simple FileMaker Pro 13 Popover Close in One Script – FileMaker Today
Yes, this is a common nuisance. Although it depends on what you want to use it for. The intended use for popovers is what is commonly seen on iOS (and more and more websites are picking it up as time goes by) – for example the iCloud tabs and bookmarks popovers in iOS Safari. Eg. for bookmarks: You tap the bookmarks icon, it pops down a popover with the list of bookmarks in it, you choose one, and it goes away. Or if you change your mind and don’t want to choose one then you tap anywhere outside of it, and that makes it go away without selecting anything. And that’s the key there. They are designed to dismiss if you click outside of them.
But we (the FileMaker Pro Dev community), as we usually do with new FileMaker Pro features, have come up with all sorts of other uses for them. I was considering a blog post on some of these unconventional uses, but it’s kinda been done to death already by others. For starters, see here: http://filemakerhacks.com/2013/12/14/filemaker-13-popovers/. In a couple of these examples, stopping it from dismissing via any means other than clicking a specific button, is desired.
What inspired me (other than my need for it in a current client project) was the end of that article where the author (Howard Schlossberg) noted a solution to that problem, but also noted he couldn’t figure out how to do it in one script, instead needing two. Obviously that was a challenge to be met, and so I met it
There’s a number of methods to stop FileMaker pro 13 popovers from closing when clicking outside, while allowing them to close when clicking a button within. Most involve two scripts. Here’s a simple way to do it all in one script. And it’s completely generic – can be applied to any popovers in a solution without adjustment!
If [ Get ( ScriptParameter ) = “Button” ]
Set Variable [$$closePopoverOK ; Value: True]
Set Variable [$$closePopoverOK ; Value: “”]
Else If [ Get ( ScriptParameter ) = “Trigger” ]
Exit Script [ Result: $$closePopoverOK]
attach this script to the button within the popover that you want to have close it (with script parameter: “Button”), and…
attach it to the popover’s OnObjectExit script trigger (with script parameter: “Trigger”)
In short my tip isn’t “this is how to stop popovers dismissing when you don’t want them to”. My tip is “this is how to do it in one script instead of two”.
Cool huh? We have a demo file you can download to play with!
About David Thorp: David is a FileMaker Pro Developer with Excelisys: David has been a FileMaker Pro developer creating FileMaker Pro solutions for over 15 years. Considered a technical wiz, an exceptional and determined problem solver, and described by his peers as one of the best FileMaker Pro developers in the industry, David excels with “encouraging” FileMaker Pro to do things that most consider impossible! The best part of his talents, is that he loves to share and implement those cutting-edge new tools and tricks for the benefit of his clients and their projects, as well as with other members in the FileMaker Pro community.
*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 & development services.
About Excelisys, Inc.: Founded in 2001, Excelisys (www.excelisys.com) is an FBA Platinum Partner and FileMaker Certified developer organization specializing in the designing, developing, customizing, supporting, consulting, migrating, upgrading, tweaking, fixing, and integrating of FileMaker Pro solutions, FileMaker Go solutions, MySQL, PostgreSQL, QuickBooks-FileMaker Pro Integration, Excel and MS Access FileMaker Pro conversions/migrations, iPhone and iPad business solutions, and other various database technologies and frameworks that automate your organization’s data solution needs for use on the web, mobile, and desktop platforms. Contact Excelisys today for a free estimate and consultation about your business software automation needs @ 866-592-9235.