.
Posted by Dempsey in Scripts
When you are automating exports of user data from a FileMaker file, the easiest place for the user to be able to find the exported file at a later date is on the desktop. How can you export a file there? Using the Get(DesktopPath) script function!
It returns the path to the desktop folder with a trailing slash ready for you to append a filename to, for example:
$file = Get(DesktopPath) & “export.xml”
Would return something like ‘/C:/Documents and Settings/Username/Desktop/export.xml‘ on a Windows machine and something similar to ‘/MacintoshHD/Users/Username/Desktop/export.xml‘ on a Mac.
If you save it to a variable you can then use it in an export path to enable dynamic export paths to the user’s desktop, without having to know their platform and system username.
»
Posted by Dempsey in Layouts
When designing a layout in FileMaker you quite often want an object to look exactly the same as another, for example when laying out lots of fields. You could use the Duplicate menu command in the edit menu, or the keyboard shortcut for that, Ctrl + D / Command + D.
Another, even easier way is to just hold down the Control key on PC (or Option key on a Mac) whilst dragging the layout object you want to duplicate and a ‘+’ sign will appear next to the pointer to show that you are duplicating the control and not just moving the original, which it would do if you weren’t holding down control/option the whole time you are dragging the control.
If you do accidently let go of the modifier key before you finish dragging and then end up moving the original control instead of duplicating it, you can easily reverse the change by using the Undo command in the Edit menu, or use the keyboard shortcut Control + Z (Command + Z on Mac)
»
Posted by Dempsey in Scripts
If for whatever reason you don’t want to use the Send Mail script step, you can achieve the same by using the Open URL script step as well.
Just use something like the following as the address:
“mailto:” & Email_Address & “?Subject=” & Subject & “?Body=” & Message
Where you change Email_Address, Subject and Message to hardcoded values, variables or fields.
It will open up a new message to be sent from the default installed mail client the same as the Send Mail step does.
»
Posted by Dempsey in Custom Functions
I was asked by a colleague the other day for a custom function to convert millimeters into a readable format of feet and inches, for example 1000mm = 3 ft 3 5/16″, I didn’t know of such a function so I made it myself and here it is:
| Function Name: |
ConvertMM |
|
| Function Parameters: |
MM |
|
| Function Code |
Let ( [
inches = MM * .03937008;
feet = Floor ( inches/12 );
inches = Mod ( inches ;12 );
num = Floor(inches);
sixteenths = Abs(Floor((inches - num) * 16));
ret = Case ( (Mod(sixteenths; 2) =1) ;num & " " & sixteenths & "/16" ;
sixteenths = 2 or sixteenths = 6 or sixteenths = 10 or sixteenths = 14; num & " " & sixteenths / 2 & "/8" ;
sixteenths = 4 or sixteenths = 12 ; num & " " & sixteenths / 4 & "/4" ;
sixteenths = 8 ; num & " 1/2" ;
num )
];
feet & ” ft ” & ret & “\”"
) |
| Example Input: |
1000 |
|
| Example Output: |
3 ft 3 5/16″ |
| Example Usage: |
$inches = ConvertMM(1000) |
»
Posted by Dempsey in Layouts
When in layout mode if you find yourself repeatedly adding fields for example and changing the formatting each time, you’ll be happy to know you can make each new item the same!
To change the new layout object defaults you just have to Ctrl+Click (Command+Click on Mac) on the field you want to copy the settings and formatting for to the defaults. Now all newly created items will be exactly the same.
»
Posted by Dempsey in Plugins
MooPlug is a multi-purpose plugin which adds many useful functions to FileMaker. It is still an early version with only support for the Windows platform, but an OS X version is planned for the future.
Some of the current functionality includes Zip extraction and compression, FTP Upload and download, File, Folder, Font and Colour Dialog showing as well as file and folder creation, copying, moving and deletion.
I think over time as more user requested features get added to it, this free filemaker plugin will become even more popular!
Website: MooPlug.com
»