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

Tuesday, June 24, 2008

Time for 9 Campaign

FileMaker has recently started a campaign to update to version 9. Limited time offer gives chance to save up to 100$. Discount is only applied to upgrade box. How ever this campaign decrease licensing cost it is not enough. Similar campaign (nearly ends) was kicked off by Winsoft for Centeral Europe, Middle East and Asia customers. Its offer up to 40 percent discount on new software licenses. You can purchase FileMaker license from local dealer or filemaker bussiness alliance partner in your site.

These campaingns are happy news but not enough for us, developers. FileMaker license fees are at high level. For a solution will be accessed by five person, my customer should pay approx. 1200$ only for license cost. This affects on competitiveness negatively for small-business solutions with FileMaker.

I think most of the developers have same problem. I am still waiting patiently and hopefully new product that only runs as client (no layout editing, no define fields, no script maker) to solve multi user high license costs...

Monday, June 23, 2008

Bin2Dec ( bin ; dmy )

Explatation : Converts binary number to decimal number.

Example : Bin2Dec ( 1100101010110001 ; 0 )
Output : 51889

Parameters : bin, dmy

Custom Function 
Right(bin;1)*2 ^ dmy +If(Length (bin) > 0;  Bin2Dec( Left(bin;Length ( bin) -1);dmy+1))

About this blog

FileMaker, the user friendly database application. This blog will be focus FileMaker Pro (FMP). Some tips & tricks, techniques, examples, explanations, comments and the things I do not know now. Some post will be exact translation of some of my posts in filemakerkullaniyorum.blogspot.com (Turkish).

I have been developing FileMaker solutions for more than 10 years. FileMaker is Apple based application. Like an Apple product, it endear it self. Like most of FM user I like to develop with FileMaker although some missing features that developers expecting for years. Every newer version close this missing feature gaps. But there are still gaps...

In addition, I am planning to publish visitors questions in Q/A part. I am waiting your questions, comments and any other request.

Although this blog is not aimed profit, I may use google ad-sense program. Please do not hesitate to notify me inconvenient ads.

Legal Note: All brand names and trademarks are the property of their respective owners.