FileMaker techniques from a full-time FileMaker developer. http://crm.fm
Monday, August 25, 2014
Quick tip: Detect OS X Yosemite dark mode from FileMaker
Dark mode is stored in a defaults entry: AppleInterfaceStyle
It's either "Dark" or no value.
So we just basically check if we get an error if we try to read this value.
If we get a value, we are in "Dark mode", else we're using "Normal mode".
Basic steps:
If [Abs (Get(SystemPlatform)) = 1] //Running on OS X
Perform AppleScript["do shell script "defaults read -g AppleInterfaceStyle""] - Native
If [Get(LastError) = 0]
Show Custom Dialog ["Dark mode!"]
Else
Show Custom Dialog["Normal mode!"]
End if
End if
That's all.
You may use this to switch to a different themed layout, or to change your background color.
Thursday, October 21, 2010
iDeal CRM 6.0 has been released!!

Saturday, August 7, 2010
FileMaker- Quick OS X Address Book importing without plugins
Friday, June 18, 2010
Multilingual FileMaker Layouts


Thursday, May 13, 2010
Simple logical board game in FileMaker



Thursday, March 18, 2010
Save to PDF in Filemaker Runtimes? - Yes
I attached a sample file, which you can download here. You can create a runtime solution from it using FileMaker Pro Advanced.
Monday, January 11, 2010
Tweet with FileMaker (simple method, Win+Mac, No Curl)
"data:text/html," &
"<html>
<head>
<script>
function PostMe() {document.getElementById(\"myform\").submit();}
</script>
</head>
<body onload=\"PostMe()\">
<form id=\"myform\" method=\"post\" action=\"http://" & FmPostTwit::UserName_Global & ":" & FmPostTwit::PassWord_Global & "@twitter.com/statuses/update.xml\" enctype=\"application/x-www-form-urlencoded;charset=utf-8\" accept-charset=\"UTF-8\">
<input type=\"hidden\" name=\"status\" value=\"" & FmPostTwit::Status_Global & "\">
</form>
</body>
</html>"
Let's take a look at it.
The "data:text/html," part is to let the web viewer have inner html content(the form).
The next part is the javascript code, which will post the form when it loads.
The last part is the html form, with the needed input (status- hidden).
This will be put into a web viewer(object name vw) by the Set Web Viewer Script step- Go To URL.
So basically the one line code is:
Set Web Viewer[Object Name:vw; URL: here comes the html code from above]
That's all.
I attached a sample file, which you can download here.
Sunday, January 10, 2010
Importing Twitter Friend Timeline into FileMaker

http://username:password@twitter.com/statuses/friends_timeline.xml
Friday, December 18, 2009
FileMaker 8+ gradient progress bar with one field - without containers

Let ( [r1=123;g1=80;b1=200;r2=10;g2=180;b2=50] ;
If ( Truncate ( (Get(RecordNumber)/Get(FoundCount)) * 100 ; 0) ≥ Get ( CalculationRepetitionNumber );
TextColor ( "█" ;RGB(
r1 + Floor((Get ( CalculationRepetitionNumber ) * (r2 - r1) / 100));
g1 + Floor((Get ( CalculationRepetitionNumber ) * (g2 - g1) / 100));
b1 + Floor((Get ( CalculationRepetitionNumber ) * (b2 - b1) / 100))
)
);""))
Sunday, December 6, 2009
Moving in your previous FileMaker found sets


Saturday, December 5, 2009
QuickTip: Creating a drop down list from an unstored calculation



Tuesday, December 1, 2009
Speeding up related record creation with importing
Monday, November 30, 2009
FileMaker Flot Chart (offline charts without plugins)

Thursday, November 26, 2009
FileMaker Multiple word(part) portal filter

AllTextCombinations ( FirstName ) &"¶" & AllTextCombinations ( LastName ) & "¶" & AllTextC
ombinations ( City ) & "¶_ALL_"
The "¶_ALL_" at the end will be important later. That's used to show all the records is the searchfield is empty.
If we have this, we need three additional fields, which will help us to create a 3 word search ability. (note: if you want four words, then you'll need four, but I think 3 must be enough).
I call them SearchField1, SearchField2 and SearchField3, and they are unstored text calculations:
SearchField1:
Let ( s = Substitute ( SearchField_Display ; "-" ; " " ) ;If ( IsEmpty(s) or IsEmpty(MiddleWords(s;1;1)) ;"_ALL_";MiddleWords(s;1;1) ))
SearchField2:
Let ( s = Substitute ( SearchField_Display ; "-" ; " " ) ;If ( IsEmpty(s) or IsEmpty(MiddleWords(s;2;1)) ;"_ALL_";MiddleWords(s;2;1) ))
SearchField3:
Let ( s = Substitute ( SearchField_Display ; "-" ; " " ) ;If ( IsEmpty(s) or IsEmpty(MiddleWords(s;3;1)) ;"_ALL_";MiddleWords(s;3;1) ))
As you may notice the only difference is the word which we get from them.
I also used a Substitute ("-" to a Space char) as my data contained many "-" chars, and I wanted them as different words).
By these we can create a relation to AllVariation:

As you can see we'll have 3 criterias. (If you want 4 word you'll need 4).
After this, if we use the portal filter we'll be able to search for things like: "we la c", or "an li v" or "Bil bar abi" so basically any part of our fields.
I attached a demo file which you can download from here . (right click- save as).
FileMaker Snake game - a FM 10 Demonstration

Tuesday, November 24, 2009
Filemaker MineSweeper clone
Started it, finished in about 2 hours.

So here it is, actually it's pretty straight forward and fully unlocked so you can check it.
The main fields of the database are the Display, and the Game Repeating field.
The Display shows the board, while the Game contains the yet unrevealed fields, mines.
The Init method initializes the board, sets the random mines, counts the neighbor cells (how many one mine has), etc.
The ClickHandler method takes care of the clicks, by using hidden clickable layout elements behind the repeating fields.
(Actually these clickable elements weren't created by me one by one, setting up different script paramters 300 times, instead I created a script to generate the appropriate XML for me, and then pasted it on the layout using Clip Manager 3 by MyFmButler. (Maybe I will show this technique in a separate article later if you're interested).
Filemaker - Using Growl without plugins
"tell application \"System Events\"¶
set isRunning to count of (every process whose name is \"GrowlHelperApp\") > 0¶
end tell¶
¶
if isRunning then¶
tell application \"GrowlHelperApp\"¶
register as application \"GrowlSampleApp\" all notifications {"& Quote ("TestNotify") & "} default notifications {"& Quote ("TestNotify") & "} icon of application \"FileMaker Pro" & Case ( PatternCount ( Get ( ApplicationVersion ) ; "Advanced" ) ; " Advanced\"" ; "\"" ) & "¶
notify with name "& Quote ("TestNotify") & " title " & Quote (GrowlSample::Title) & " description " & Quote(GrowlSample::GrowlText) & " application name \"GrowlSampleApp\""& " sticky "& Quote (GrowlSample::Sticky) &"¶
end tell¶
end if¶"
----
The first part checks if Growl is up and running. The second part registers the application, and notifies with the set parameters.
The icon it shows is the Icon of FileMaker, but it can be changed to anything you wish.
We also have to check for Get(LastError) -609 to be sure.
I attached the sample file which you can download from here. (right click- save as!)
UPDATE: A commenter (doug says:) Here is a custom function that does a similar thing:http://www.briandunning.com/cf/1064
Based on ideas and code from Michael Gaslowitz http://www.gaslowitz.net/filemaker/blog/2008/07/video-growl-integration/
Thanks for that!
Note by Adam: However that custom function needs to be modified a little bit, as it doesn't checks for the GrowlHelper app running, be sure to change that!


