Friday, July 25, 2008

Pick One Copy of Duplicate Records

Some times we need to delete duplicate records. I used to define script with loop to do this automatically. But now I show a simple way to do this on an example:

We have some set of records shown in the image below. Assume that we want to make a list of box types, so we should delete duplicates in order to get box list.

There are 9 records in the table above, some products are placed in same box. To pick only one copy of each box sort the records by BoxNo field.



The second step is exporting records. The key point here is grouping, check BoxNo in Group By part of the dialog box.


Click export button. It is ok! Only one copy for each box type is exported. 

Click here to download example file (.fp7)

Tuesday, July 22, 2008

Save as PDF From FileMaker Runtime File

One of the coolest feature comes with FileMaker Pro 8 is "Save As PDF" option. You can save your report as PDF by selecting Save/Send Records As>PDF from file menu directly from FileMaker.

But if you are planning to share your solution with others who does not have FileMaker Pro, you must compile your solution. Problems starts here, you can see Save As PDF option dissappears in Runtime.

A simple solution for this issue is PDF Drivers. You can print as PDF with Adobe Acrobat Professional version. But it is expensive to buy if you only want to save as PDF. I am using small PDF driver software to do this. Cute PDF is a free application can print your pages / reports as PDF. I am currently use it and I like it. Click here to download Cute PDF Writer.

After installing Cute PDF you will see Cute PDF option in print dialog box. Select Cute PDF and print your report in PFD format.

Wednesday, July 16, 2008

Integrate Flash file into FileMaker Pro

This example shows animated buttons and animations can used directly in FileMaker. Web viewer can solve this types of missing features of FM by the capabilities of Adobe Flash (swf) Files. I will add additional usage of web viewer later.

Click here to download example file for windows (setup file - runtime)

Click here to download example file for mac (zip - FileMaker Required)

(The example is Turkish, small application shows soccer scores in Turkey league)

Tuesday, July 8, 2008

Hex2RGB ( hex ; delimiter ; alert )

Description :  Converts hex color codes to decimal RGB

Example : Hex2RGB ( "0CAB10" ; "-" ; "Hex is written wrong" )
Result : 12-171-16

Parameters : hex, delimiter, alert

Function
Let (

// Input value check

chex = Upper ( Filter ( hex ; "0123456789aAbBcCdDeEfF" ) ) ;
If ( Length ( chex ) = 6 ;


// RED
Substitute ( Middle ( chex;1;1) ;
[ "A" ; 10 ] ; [ "B" ; 11 ] ; [ "C" ; 12 ] ; [ "D" ; 13 ] ; [ "E" ; 14 ] ; [ "F" ; 15 ] ) * 16 +

Substitute ( Middle ( chex;2;1) ;
[ "A" ; 10 ] ; [ "B" ; 11 ] ; [ "C" ; 12 ] ; [ "D" ; 13 ] ; [ "E" ; 14 ] ; [ "F" ; 15 ] ) * 1

& delimiter &

// GREEN
Substitute ( Middle (chex;3;1) ;
[ "A" ; 10 ] ; [ "B" ; 11 ] ; [ "C" ; 12 ] ; [ "D" ; 13 ] ; [ "E" ; 14 ] ; [ "F" ; 15 ] ) * 16 +

Substitute ( Middle (chex;4;1) ; [ "A" ; 10 ] ; [ "B" ; 11 ] ; [ "C" ; 12 ] ; [ "D" ; 13 ] ; [ "E" ; 14 ] ; [ "F" ; 15 ] ) * 1

& delimiter &

// BLUE
Substitute ( Middle (chex;5;1) ;
[ "A" ; 10 ] ; [ "B" ; 11 ] ; [ "C" ; 12 ] ; [ "D" ; 13 ] ; [ "E" ; 14 ] ; [ "F" ; 15 ] ) * 16 +

Substitute ( Middle (chex;6;1) ;
[ "A" ; 10 ] ; [ "B" ; 11 ] ; [ "C" ; 12 ] ; [ "D" ; 13 ] ; [ "E" ; 14 ] ; [ "F" ; 15 ] ) * 1

// Alert if input is miss-typed or wrong
; alert ) )


Detailed Description : Hex2RGB function converts standard hex color codes (generally used in html web sites) into RGB. Hex color codes is form of 6 or 7 (with #) characters. R is first two characters in hex format, G is next  two characters in hex format and B is last  two characters in hex format. For example "#FF00AA" is converted as decimal RBG as following : (171;205;239)

Thursday, July 3, 2008

Zebra Patterned List View


In FileMaker Pro you can alter even lines background color in list view. Zebra patterned list views makes easier to browse records in list view. You can follow  steps blew to do this;

Step 1: Enter layout mode (In any list view layout)
Select Layout Mode from View menu (Cmd + L | Ctrl + L )

Step 2: Enter part set up of body
Double click on body part or select part setup from layout menu and double click body

Step 3: Check "Alternate Background Color"
Use soft color suitable for background


Step 4: Select color
The color you have selected will be display in even rows

Step 5: Click OK to exit, enter browse mode
Select Browse Mode from View menu (Cmd + B | Ctrl + B )

It's done!

Note: This feature is added to FileMaker Pro 8

May be you know, but may be not!

FileMaker is elegant application. It is easy and user friendly. Some features (however easy to use) they might be overlooked. In past I don't care to write them here. I decided to write them here. May be you know or not. I will tag this types by "MYKMN"

The first entry is here: Zebra Patterned List View