We help IT Professionals succeed at work.

FM - Using Send Event to Create A Directory from Filemaker

rvfowler2 used Ask the Experts™
I'm trying to use a Send Event to create a file from Filemaker.  I was able to do it successfully if I quote the text; however, when trying to add a variable so that it would recognize our Property Code and Work Order#, it doesn't work.  It seems the $FilePath needs to be quoted, but I don't know how to do that in the calc without rendering the variable useless.  Any ideas?  See attached.  capture.JPG
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
President, Dedication Technologies, Inc.
If you need quotes to appear in a calculation you use the backslash escape character, e.g. "\"Fred " & "and Jane\"" returns “Fred and Jane”, with the quotes included. The backslash escape character is also used to include other characters within a text string such as backslash itself \\, e.g. "\"Fred \\ Jane\"" returns “Fred \ Jane”.

Depending on the situation you might also find the Evaluate() function helpful: https://fmhelp.filemaker.com/help/13/fmp/en/html/func_ref3.33.4.html

Finally, FileMaker Pro 18 now has a number of new File Manipulation script steps that were previously only available via third-party plugins like Troi File Plugin or BaseElements Plugin. They allow you to Create, Open, Read, Write To, Close, Rename, Delete, Get File Size, and check "Get File Exists". Here's a great article that explains all the new script steps.



Thanks, forgot about the backslash.  Will look further into evaluate function.  I have FM 16, so 18 doesn't help at this point, but good to know.
Will LovingPresident, Dedication Technologies, Inc.

With regard to FM Licensing, Claris International (formerly Filemaker, Inc.) sells both "perpetual" and annual subscription licenses. At this point, for nearly all users, highly recommend going with annual licensing in the future for the reasons listed below. I personally no longer resell/distribute perpetual licenses.

1) Annual licensing give you access to the current version when it's released
2) Annual licensing costs about 1/3 of a perpetual license
3) In the past, users would generally "buy and hold" a perpetual license for about three years which makes it about the same cost as annual licensing except that annual includes the automatic update to each new version
4) Having annual licensing means you have access to the most recent features including increased security measures and compatibility with current Operating systems. FM is now on an annual release cycle in April/May each year rather than the 2-3 year long cycle of the past.
5) Annual gives you a relatively stable annual cost instead of having to justify a much larger expense every few years
Will LovingPresident, Dedication Technologies, Inc.

And, you can do many of FileMaker 18's File Manipulation steps using the free BaseElements plugin.



Thanks, and just a note:  After creating the folder, I had to put a script step to pause 1 second before using a script step to open it.  Was getting an error.