NavigationEasier DevelopmentClick 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! |
News & BlogsKen Moorhead Blog Post - Create FileMaker Server Backup to Remote Folders on Windows, Part 1So, your client is running FileMaker Server, and they want their backup files to be stored in a shared or remote folder on the network so an automated routine can pick them up from another computer. And your client is not flexible about this... - (Excelisys)
Create FileMaker Server Backup to Remote Folders on Windows, Part 1…FileMaker Server Backup to Remote Folders on Windows OS
So, your client is running FileMaker Server, and they want their backup files to be stored in a shared or remote folder on the network so an automated routine can pick them up from another computer. And your client is not flexible about this; the files must be in the network folder by 3:00am or very bad things will happen! <insert doom mood music here> You then dutifully go to the FileMaker Server (FMS) console and type in the new backup path only to find out, no matter what you do, it is not a valid path. You are unable to have FileMaker Server backup to a remote folder, now what do you do? FMS can only back up to LOCAL folders/drives. So, FMS is correct – it is not a valid path. FMS will not let you back up to a remote folder for some very good reasons, which they dutifully detail in their Best Practices. To be fair, while this might seem as if it were anything from an annoyance to an oversight, to a flat out bug, they have strong points and they prohibit it for good reasons. But, good reasons or not, your client needs those files in that shared remote folder… How do you make FileMaker Server backup to remote folders? The answer is simple enough, you let the OS handle it in any number of ways. What follows is a solution for Windows that I set up a few years ago for a client. It was, to my thinking, the simplest of all solutions: run a system-level batch file. The batch file in question, named copy.bat, uses xcopy to achieve its magic. The xcopy command is a Windows shell command that copies files and folders from one location to another. FMS’ ability to run system-level scripts allows you to use this batch file to copy your backups to any location on the network visible from the FMS service. Here’s how I put it together:
The copy.bat file will just be a plain text file containing the following command: xcopy /y /s /e /d:%date:~4,2%-%date:~7,2%-%date:~10,4% <<LocalBackupFolder>> <<RemoteFolder>> When creating your copy.bat file, substitute <<LocalBackupFolder>> and <<RemoteFolder>> with your actual file paths, each enclosed in quotes. You should also be sure the Windows setting to hide file extensions for known file types is disabled, so you don’t unintentionally name your file copy.bat.txt. With actual folder paths, this might look something like: xcopy /y /s /e /d:%date:~4,2%-%date:~7,2%-%date:~10,4% “C:\Program Files\FileMaker\FileMaker Server\Data\Backups” \\Server\Data\MyBackups WAIT! There’s More! In part two of this series I will show you how to, using the same paradigm, copy yesterday’s backup. This allows for the common condition of copying an 11pm FMS_Backup using an ‘OS_MoveLocalBackup_Script’ fired at 4am the next morning when the network is good and quiet. In the meantime, enjoy! While I can attest that this script works, as it is being used right now, I strongly ask that you use this with caution. Please test and experiment with it on something that you could afford to lose to make sure it works for you and within your environment/situation. This script/technique is being shared with you “AS-IS” and we do not offer any free support, so use this technique at your own risk. But if you would like to retain our services to assist you, please contact one of the Excelisys account managers, Rick or Mark, and we would love to work with you! Author: Ken Moorhead - Ken has been a Lead Developer with Excelisys for 9 years and is one of the consistently top requested LD’s by Excelisys’ clients. When it comes to development, Ken is all business and no fluff. He dives into the most complicated problems and wrestles them to the ground. He is willing to tackle problems where others run and hide! We love Ken! ** FileMaker and FileMaker Server are registered and copyrighted trademarks of FileMaker, Inc. in the U.S. and other countries.Staying on the Keyboard Thanks to FileMaker Script TriggersI find myself much more efficient when I can keep my hands safely planted on the keyboard, and I'm notorious for trying to be as efficient as possible. So, what's my latest qualm? Searching on websites.The search bar in most browsers is useful when I don't know what my final destination is, but what if I know exactly where I want to find a recipe? Or a definition? Or anything else that also has a search function? I realized I have to type in the website (or click on a shortcut), then click in the search bar (or hit tab a million times in hopes of finding it... but that usually ends up taking longer and leaving me more frustrated) and type what I'm searching for. Really, the issue is that I know what I want to find often before I know where I want to find it. It's easier for me to type my criteria, and then find my search engine. What if I could do everything I want, without leaving the keyboard? *Cue FileMaker* In FileMaker, I can capture most keystrokes via a script trigger and then do whatever I want. Maybe the up arrow takes me to the previous record or portal row. The down arrow, working as its poetic counterpart. So what if I had a field that served as a search bar and some preset options on where I wanted to search. It can be done and I had to do it. So the file "Searcher" was born. An early disclaimer: There are a ton of possibilities on how to get this done with FileMaker. This is just one way and if you've implemented something similar, please leave me a comment! I'd love to hear about it! So, let's dive in! Here's the Searcher.fmp12.zip file. First, I have a table of "search engines" or websites with searching capability. Each record has the URL string with "<<SEARCH>>" as the placeholder for the actual search string – in this case, it's "quiche" (I've been wanting to make this green chile quiche for the past couple of days, so you're stuck following along in my hungry, quiche-less world). Notice that I have a field labeled "Space Replacement". Some websites are really touchy about spaces in searches. So, I've created a field that tells the script with what to replace spaces. If it's blank, the space remains. There's also a "Rank" field so that my most commonly used websites will sort to the top. The front end of this FileMaker file is this: It's pretty simple and it's meant to be simple! So what do we have:
Open up the file and you'll see that nothing is selected. Just start typing. Don't click in anything, and don't mouse to the search field. BAM! In the search field we go. Go ahead and type a search term of your choice. As mentioned before, I'm going with "quiche". Now from here, you have two options: Hit the enter key (which will default to the first search engine in the portal) or hit the down arrow, which will take you through the portal. If you took the latter approach, once you are on the search engine of your choice, hit the enter key to update the web viewer. The web viewer is well and good, but what if you want it opened in your web browser? Hit Shift-Enter and the script will open in your web browser! Now let's say you mistyped quiche and spelled it "keesh" (understandable mistake. I don't judge), and want to go back to the search field. You can once again just start typing or hit the escape key to delete the search field and start from scratch. Lather, rinse, repeat and you have yourself a quick searching tool! So let's look at the scripts that make this work: The first script is responsible for knowing what keystroke is responsible for activating the script trigger, and acting according to the keystroke.
Notice that the up and down arrows are responsible for moving up and down the portal. The Enter and Return keys are used to perform the actual search based on the portal selected (or if no portal row is selected, the first portal row is used). The escape key will clear the search field and take the user to the search field. Any other key, will take the user to the search field, allowing them to continue typing. The second script (which runs as a sub-script when the user hits the Enter or Return key) is responsible for creating a proper URL.
If there is no portal row selected, which probably means you're still in the search field, go to the first portal row. Based on the selected portal row, grab the general URL string (with "<<SEARCH>>") in it, grab the space separator, if any, and create a working URL. The calculation for that looks like so: Let( [ searchfield = Interface::Search ; criteria = If( IsEmpty( $$spaceSeparator ) ; searchfield ; Substitute( searchfield ; " " ; $$spaceseparator ) ); url = Lower( $$url ) ] ; If( not IsEmpty( url ) ; Substitute ( url ; "<<search>>" ; criteria ) ) )It looks more complicated than it really is.
That's pretty much it for the script! If you held down the shift key, the URL opens in your browser. If you didn't hold down the Shift key, the window is refreshed, to update the web viewer. This is just one example (of many!) on how script triggers can keep you and your users on the keyboard. Really, it's making for a simple user interface. Is there a learning curve? Sure. But what if it makes your users happier and more efficient in the long term. Feel free to play with the file; break it, fix it, and make it better! Enjoy! Now it's quiche-making time... File: Searcher.fmp12.zip Database FileMaker FileMaker FileMaker 12 Script Triggers Searcher FileMaker 12 SearcherNew Version - Lower Price: Allegro Timeclock - Small Business EditionAllegro Timeclock is a virtual time clock, estimating and billing solution for FileMaker 11 and 12 (.fmp12 and .fp7 files are included in the bundle)... - ()
Henry Schein Dental marketing group arms 800 sales reps with iPad solution created with the FileMaker PlatformOver the last 80 years, Henry Schein Dental has reinvented itself to meet customer needs, taking advantage of technology breakthroughs and tapping into burgeoning markets. Today, the FileMaker Platform is helping the Fortune 500 company showcase its products with a custom sales-literature solution running on iPads in the hands of 800 sales consultants... - (FileMaker Inc.)
Update to FM Quizilla 3 is released nowMetaSys Software has released an update to FM Qizilla 3 adding more features to the application... - (Métasys)
Soliant's Annual Offsite & VolunteeringIn January, everyone at Soliant came together in Santa Cruz, CA for our annual company offsite. This was my first year attending and it was so much fun (which is actually an understatement). We learned about how Soliant has done over the years and discussed company-wide goals for 2013. It wasn’t all serious (actually, I’m not sure we went more than 10 minutes without something funny being said). We had a great time playing board and card games, strumming instruments and singing around the fire pit, and roaming the Santa Cruz boardwalk (Careful: Soliant Developer Sara is an impressive laser tag opponent). Possibly the most awesome thing we did during the offsite was volunteer at Homeless Services Center in Santa Cruz. Throughout the year, Soliant donates money to charities, which is a fantastic thing in itself. But going out and spending some time helping was an unforgettable experience and a true feel-good moment. We started off by getting a tour of the shelter: whether it’s emergency help or homes for families to help them get back on their feet, this shelter has it all. They made it very clear that their goal was to help prevent homelessness, which means their services include things like job placement and counseling; the ultimate goal being self-sufficiency. But like any non-profit organization, they can always use some volunteers. Once we had a better idea of who we were helping, it was time to get to work! We split up into groups to rake leaves, do yard work, clean, and create cards and luggage tags. All the Chicagoans wanted the yard work. “It’s so nice outside,” they said. False. For a girl who’s lived in Texas for 6 years, it was cold. So off they went to bask in the sun and enjoy the lack of snow on the ground. Another group cleaned anything and everything they could in the Family shelter. The Family shelther has suffered during the cold and flu season, so cleaning and disinfecting surfaces was a constant and necessary thing. There was a large pantry and dining area, as well as 2 lounges, that needed a bit of sprucing up, so towels and mops in hand, that group gave things a good cleaning. I was part of the group in the craft room. In December, the woman who works in the mailroom made Christmas cards for the residents and realized just how a simple (though time consuming!) action really made people smile. This time around, she asked us for our help in creating Valentine’s day cards (200 of them!), as well as luggage tags for those who stay in the shelter. By the end of it, we'd made friends with a few kids staying at the shelter and Makah took a little time to swing alongside her new friend. Well, I'm not sure this little girl was my friend after I politely said no to her taking a picture with my dSLR, but I could be wrong. Oh, who am I kidding... the picture doesn't lie. Priceless. It was a privilege to help and to be a part of something bigger. Thank you to Homeless Services Center for having us! I think it’s fair to say that it was one of the most fun work events I’ve ever been a part of. Here’s my final thought: Every day, I work as a developer and a consultant. I talk to clients, I develop in FileMaker. I discuss workflows and processes, expectations and timelines. I work! Now, to be clear, I love my work. I get to help clients solve work problems, which hopefully leads to a happier work life for them. It doesn’t get much better than that. That is, until I realized that I work with some of the most amazing people out there. We got together for a few days, talked about the company, and had a blast getting to know each other better. Soliant promotes work-life integration, and the offsite was great proof of that. These aren’t just my co-workers. These are friends who are the brightest and best of the industry. And we get to do a little good in the world together. Life @Soliant Offsite Developer Homeless Services Center Santa Cruz Soliant ConsultingPCI Expands FileMaker Pro Hosting ServicesProductive Computing, Inc., a Platinum member of the FileMaker Business Alliance, today announced the opening of a new FileMaker® Pro hosting data center to service customers east of the Mississippi river... - (Productive Computing Inc.)
FileMaker Unveils iOS Demo SolutionsFileMaker, Inc. today announced the FileMaker iOS Demo Solutions webpage, where businesses will find free downloadable demos that highlight custom iPad and iPhone solutions created using the FileMaker Platform. The sample solutions reflect a wide range of real-world iOS business uses and have been created by leading independent FileMaker developers... - (FileMaker Inc.)
Cleveland Consulting announces the release of CCPivot 2Cross tab and pivot table reports have never been easier or more powerful. We at Cleveland Consulting have worked hard and rebuilt the very successful CCPivot product from the ground up to completely take advantage of everything that FileMaker 12 has to offer... - (Cleveland Consulting, Inc.)
FileMaker to Present "The Tablet Productivity Payoff" at TabTimes Tablet Strategy West"The Tablet Productivity Payoff" will be discussed by Ryan Rosenberg, vice president of marketing and services for FileMaker, Inc., at the TabTimes Tablet Strategy West conference, Wednesday, Feb. 20 in Burlingame, Calif... - (FileMaker Inc.)
Speed up FileMaker 12 development with Typinator function snippetsErgonis Software today is proud to announce the immediate availability of a new set of abbreviations for functions in FileMaker 12, which can be used with Typinator, its highly acclaimed text expander. The new set contains over 370 snippets that cover all FileMaker 12 functions... - (Ergonis Software gmbh)
CNS Barcode 1.4 Now Available on iTunes App StoreComm-Unity Networking Systems has released an update for CNS Barcode, a Barcode Scanning and Generating App for iOS devices running iOS 5.0 or higher. Version 1.4 adds support for the taller screens found on the iPhone 5 and iPod Touch 5th Gen devices, as well as several customer-requested features and bug fixes... - (Comm-Unity Networking Systems)
[ISO FileMaker Magazine] - Using Development Standards = Faster DevelopmentHaving personally developed with both languages and frameworks which implement strong sets of standards, I quickly found that having some form of standards imposed, allowed me to focus more on the solution once the conventions were learned. I wasn't doing the same type of thing in two different ways due to the current "known" way... - (ISO FileMaker Magazine)
Remote FileMaker Training Series Course in April 2013Well known FileMaker authors John Mark Osborne and Steven Blackwell are authorized to teach the FileMaker Training Series for FileMaker Pro remotely. Remote classes offer students the same benefits of a traditional classes like asking questions and in-class exercises but without the cost of travel and time away from work... - (Database Pros)
MBS Filemaker Plugin 3.1MonkeyBread Software today is pleased to announce MBS FileMaker Plugin 3.1 for Mac OS X or Windows, the latest update to their product that is easily the most powerful plugin currently available for FileMaker Pro... - (Monkeybread Software)
myFMbutler DoSQL 2.0: Do more with SQL in FileMaker Pro 12myFMbutler, the makers of Clip Manager, the DoScript plug-in, PrinterSwitch and AutoSender, today announced the immediate availability of DoSQL 2.0... - (myFMbutler)
Using Javascript and Markov Chains to Generate TextMy co-worker Sara and I got to talking about our guilty fondness for Lifetime original TV movies. Apparently, we've both watched our share of those Saturday afternoon tear-jerker stories, where someone makes a melodramatic plea to their love interest, while somebody else is fighting off cancer, and all the actors look vaguely familiar because they were either famous fifteen years ago or you saw them a couple of weeks ago in a different TV movie. Sara pointed out one of the best (worst?) things about these movies: their titles. I discovered that, on Lifetime's site, they offer a listing of their entire movie directory. Almost two thousand titles, nicely formatted and ready for scraping, and almost all of them wonderfully awful. Titles that, like the movies themselves, try so hard to evoke pathos that they have almost the opposite effect, like: "A Touch of Hope", "In Spite of Love" and "The Stranger I Married" (Originally, in Canada, the title for this film was "The Man Who Lost Himself"— someone actually thought enough about this to change the title for the US market). A fan-made music video for "The Stranger I Married" I couldn't let all this data go to waste. I thought it would be fun to build a Lifetime movie title generator, using the list of titles from their movie directory. My goal was to write a piece of code that would be able to generate strings that could pass for original titles of Lifetime movies. I was going to use statistical information gleaned from the title corpus to rearrange and piece together words from these titles into new, similar sounding titles. The resulting solution uses Javascript to do the generating. Here is a list of titles which includes both real movies that Lifetime has aired or will air and also titles generated by the title generator. Can you tell which ones are real and which ones are generated? A Crime of Love and Innocent Victims First, Do No Harm Why I Want to Heal Honeymoon with Mom Dirty Little Man With Harmful Intent Moment of Truth: Cradle of Conspiracy Another Man's Wife He Forgot Dying to Remember One Hot Summer House Of Deceit (2006) When Billie Beat Bobby A Nightmare at 17 The Party Never Stops Amber's Story of the Shadows Murder or Memory? A Moment of Truth Movie Dr. Quinn: The Perfect Alibi Answer: the ones on the left are fake, the ones on the right are actual titlesTo begin, I wrote a quick script to scrape the data from Lifetime's site. Their listing pages were machine generated, so the content was easy to locate programmatically. I won't cover the script I used to scrape the data (maybe in a future blog post), but you can find the results here in text format. There were 1,968 titles scraped from 132 pages. My plan was to use a mathematical structure called a Markov chain to model the statistical likelihood of a word in a title being followed by some other word in a title. Then, I could use that statistical information to generate new titles by choosing the first word (at random) and then choosing subsequent words with a frequency proportional to how those words are arranged in the original text. This will give me a string of text that may not be in the original text, but will share stylistic properties of the original text. While my first approach to writing this generation code did explicitly compute the statistical properties as described above, I later decided to avoid these explicit computations with the trade off of a little bit more memory usage but much cleaner code. The code and the compromise will be explained below. As an illustration of how this Markov chain model might look for this list of titles, consider this small subset of titles:
We begin by constructing a list of unique words that appear in these titles: "The", "Christmas", "Wish", "Client", "List", "Clique", "Cold", "Heart", "of", "a", "Killer", "Colony", "Color", "Courage", "Love:", "Jacey's", "Story", "Purple", "Con". Next, for each word in this list, we count which words follow that word and with which frequency. For example, the word "The" is followed by "Christmas", "Clique", "Cold", "Colony" or "Con" 10% of the time, followed by "Client" 20% of the time, or "Color" 30% of the time. In any text generated from this corpus, we should expect the same statistical properties to hold, if we want to maintain a similar style and feel as the original sample. Here is the full graph of probabilities for the above sample text. Here, each vertex represents a word that appears in the corpus. For each word, when that word is followed by another word, the probability that this occurs is represented by a labeled directed edge between those vertices. Using this picture, we can try generating a few words by choosing to start with the word "The" and for each new word desired, we'll roll a die and decide which next node to move to accordingly. Some possible generated strings include each title from the original list, but also the new titles "The Color of a Killer" or "The Cold Heart of Love: Jacey's Story". With more data, a more complicated graph can be constructed, and more interesting and varied strings can be generated as a result. You should use as much data in your corpus as you can find! That's roughly how the text generator works in general. However, I avoided computing the probabilities for each word by instead storing a list of every word following each word (including duplicates). Choosing from this list at random will have the same consequence as rolling a die and choosing the next word from a stored list of probabilities, but this way I don't have to go through the trouble of computing those numbers or the cost of making a bunch of floating point comparisons for each word. Here is the code. Note that titles is an array of strings already defined with the corpus list of titles: At the start, I initialize the object that will store the list of words as properties, with the values being a list of words that have been known to follow that word (preserving multiplicity). I also initialize two other structures which I use to keep track of which words are found at the ends of titles and which words are found at the beginning of titles. I do this because after some tweaking, I found that I can get subjectively better results if I have my generated titles also start and end with those same words. Then, I begin building the wordstats database. For each title, I take note of which words appear at the start and end. I store the terminal words as properties on an object rather than values in a list because I only care about the unique list of words and I know that I'll only ever use this list to check for inclusion, so this way is faster than looping through the list or using indexOf(). Then, for each word in each title, the code simply initializes or adds to the list of words following a given word, which is stored by key in the wordstats object. That is pretty much all that needs to be done to embody the statistical relationship in the sequence of words in the original titles. Next, I define a little helper function. Given an array, I would like to have returned a random element from that array. Finally, I define the actual function to generate titles. I parameterized this function based on minimum number of words that should be included in the title, because after some testing I found that shorter titles either did not make sense or were too often real titles from the corpus. Most of the function works to try to build a list of words for that title up to the minimum length, but sometimes that isn't possible because too early on a word is reached that does not have any following words in the corpus. When that happens, a line at the end of the function catches it and just starts the whole process over again (actually it recurses, but I do this with confidence that an appropriate title is very likely to be generated sooner rather than later— this could also be done by wrapping most of the function in another while loop). The function begins by choosing a word at random from the list of known start words. Then, as long as there are words that have been known to follow that word, it chooses one of the following words at random (exploiting the fact that this list of following words preserves multiplicity and so a random choice from the list is representative of likelihood in the corpus). Once the minimum word length is met (if it can be met), the function will keep adding words but will now start checking for words that are known to have occurred at the end of a title, so that it can preserve that property for the generated title. These little tweaks (setting a minimum length, choosing to start with start words and end with end words) are all adjustments I made because I felt that these changes improved the subjective quality of the resulting titles. If you are planning on doing something similar, you may want to start by not including these tweaks and deciding on how to improve the quality yourself. That's all there is to it. I find that titles with a minimum length of about 3 to 5 words works out nicely. To aim for roughly that length, I call the make_title function with code that looks like: var title = make_title(3 + Math.floor(3 * Math.random()));Try it for yourself by clicking the Generate button: Web JavaScript JavaScript Title Generator Markov Chain Lifetime Meat Loaf |
Be Notified!Let us tell you when a new video is posted. We'll send you an email with a direct link right to your email inbox.
Make sure and whitelist (or add to your address book editor@filemakermagazine.com10 Most Recent Videos |