My Writings. My Thoughts.
This one goes to (FileMaker) 11
// March 26th, 2010 // 2 Comments » // FileMaker
I had the privilege to attend Alexei Folger’s demonstration of some of the new features in FileMaker 11 at the DIGFM March 2010 meeting. I’d like to share the things I learned.
Charting a New Course
The chart object ( prior to its release, was a popularly requested feature by developers) is a new way to visually organize and display your data in FileMaker 11. Charting is to FileMaker 11 as Script Triggers were to FileMaker 10. Native charting, in FileMaker is faster than plug-in or web viewer based alternatives. There is still so much more FMI can do with charting… look for enhancements to the chart layout object in future release versions of FMP. FileMaker has just scratched the surface with charting.
A chart is a layout object, therefore you can’t export a chart much like you can’t export tab control objects. Charts can be placed in different layout parts (header, footer, body,etc.). If a chart is placed in the header, it will display data from the record that you’re currently on or have open, otherwise it will default to the first record in the found set. Data used in charts must be delimited by carriage returns and the number of values in x and y column should be exact. Charts are dynamic in nature, when you update the data in a record the change will be reflected in the chart immediately. If you hover over a chart value, a tool tip-like window will display values from the x and y column. You have the option to subsummarize your chart data as well, technically minimizing the number of bar or pie slices displayed in your chart object.
While you can’t export chart objects, there are ways to get charts out of FMP. For example you can take a picture clipping of the chart (drag and drop the chart to your desktop- Mac) or you can print/save the record(s) to PDF. You can also take advantage of the GetLayoutObjectAttribute function to return some bitmap information and an XML description about the chart object.
The chart layout object shows up in layout section of the Database Design Report.
Alexei also demonstrated Savvy Data’s SavvyData_ChartFun.
Some caveats about charts:
- there are no scatter plot charts
- no combination charts (line and bar charts)
- you can’t stack charts
- you can’t choose custom colors for graphs, need to choose from FileMaker’s predefined color pallet.
Google It in FM 11
What is Quick Find? It is a multi-request find for every field on the layout. By default quick find is turned “on” for every field of every layout of every database.
In layout mode green magnifying badges in lower right corner of fields indicates that quick find is turned on and finds will generally be expeditious in manner.
Yellow magnifying lenses are cautionary and are attributed to unstored or related fields which can slow down a search. You can disable Quick Find in the layout set up dialog window.
FM 11′s Quick Find will build field indexes if they’re not already indexed when performing a find. Quick Find will also search on merge fields.
Inspector Gadget
The new Inspector allows you format layout objects in layout mode. The Inspector has replaced some contextual right click menu items (e.g., right clicking on a field in FileMaker 11 we have lost “Text Format…”, “Date Format…”, “Field/Control”, “Set Sliding/Printing” and “Set Tooltip…”) for the “purpose” of speeding up the development of your solution. The Inspector can be opened in multiple instances allowing you to display each of the 3 inspector tabs (Position, Appearance and Data ) in a separate Inspector window.
Portal Power
FileMaker has introduced the portal filter feature to minimize the creation of new relationships to create subsets of data within a portal. Aggregate calculations (for instance the Count function for calculating the total number of records being displayed in a portal) will not work for portals that have a filter applied to them. The Count function will calculate all the records for the base portal the filter is being applied to. An interesting question raised during the session was, can you filter on unstored calcs? This question remains to be answered.
A caveat of the new portal filter feature is that if you use a Go To Related Record script step, it will display all the records based on the portal used for the filter.
Snapshot Link in a Snap
Snapshot link creates an XML file (.fpsl) all of the crucial information you’d like to share for a found set of records. Will Script Triggers fire (onRecordLoad and onLayoutEnter)? Yes they will, but the Snapshot link will also supply the information contained in the metafile to display the records it is supposed to display. So triggers will fire before the snapshot link displays its records. Snapshot links are scriptable thanks to a script step.
You can open up a .fpsl file in a text editor (like TextMate and Dreamweaver) and edit the XML formatted values, however, there are chunks of information in the .fpsl file that you cannot describe with text, so you cannot create the files from scratch.
You will get an alert message when trying to restore data if you delete a record that was in the original found set of records when the snapshot link was created. Snapshot Links may replace commonly used opener files.
Some Things About Server
New in FileMaker Server 11 is the ability for an administrator to monitor individual client statistics, however, FileMaker server can take a performance hit when viewing too long.
FileMaker Server 11 Advanced sports new drivers for JDBC and ODBC and, according to Alexei, they’re faster and more reliable.
A caveat about upgrading: make sure you run the uninstaller program in FM Server 10 before installing server 11.
I hope you find this information helpful, and happy FileMaking!
Quick Tip: Aggregate List Function
// February 11th, 2010 // Comments Off // FileMaker, code
I found this gem at http://www.briandunning.com/cf/1116
Evaluate( Substitute( list ; “¶” ; “+”) )
This is a beautiful function. I am in awe of its simplicity and power.
Quick Tip: Closing Pop-Up Windows in FileMaker
// January 9th, 2010 // Comments Off // FileMaker, code
I use pop-up windows in my FileMaker solutions to give the user a sense of the task they are about to perform is important. Whether it’s transactional data entry using global fields or entering data directly into a field, the task is entering or editing a very critical piece of data. All my pop-up windows are named using this convention: Verb – Object (e.g., Enter Start Date ). Once the action is performed (the user clicks a button to continue or cancel with the data entry/edit ) I close the pop-up window. How do we ensure that we’re closing the correct window? That’s easy!
The name of the window is set in a previous script using the “New Window” script step. A local variable is employed to capture the name of the window using the Get( New Window ) function. The user is given a binary decision in the form of two buttons “Continue” or “Cancel” in the pop-up window. Clicking on either will execute this code:
Script
Set Variable[ $_windowName ; Get( WindowName ) ]
// do something
Close Window [Name: $_windowName ; Current file ]
H1N1 PCR Diagnostic Tests to Use Local Biotech Company’s Oligos
// November 16th, 2009 // Comments Off // H1N1, PCR, diagnostic, oligo
Local Bay Area biotech company Biosearch Technologies has obtained a license from the CDC for the novel H1N1 Influenza signatures along with the Influenza A sub-typing panel signatures. This means that Biosearch Technologies’ oligonucleotides (oligos or primers) will be used in PCR diagnostic testing for detecting the H1N1 flu strain. The PCR diagnostic test has greater sensitivity, and therefore better accuracy, at detecting the pandemic strain (H1N1 type A) of the flu virus, than current rapid detection systems. Because of its sensitivity, the PCR test will also be able to detect if a person has had H1N1, if tested early enough (on or shortly after day 5).
FileMaker Custom Function for Creating Random DNA Sequences
// August 24th, 2009 // No Comments » // Custom Function, DNA, FileMaker
I am developing a small application to store short DNA sequences or oligos. One of the things that I need to test is the performance of the application for finding a unique sequence amongst thousands of sequences. I needed to come up with a quick way to generate random sequences of known length/size. Recursive custom functions in FileMaker came in handy once again to achieve the task.
cf_DNA_Polymerase ( size )
The parameter “size” is the number of bases that constitute the oligo.
Here is the custom function:
Let(
randomNum = Int ( Random * 100 ); // a randomly generated integer between 0 and 100
Case( size > 0 ;
Case(
randomNum ≥ 0 and randomNum < 25 ; “A” ;
randomNum ≥ 25 and randomNum < 50 ; “T” ;
randomNum ≥ 50 and randomNum < 75 ; “G” ;
randomNum ≥ 75 and randomNum ≤ 100; “C” ;
) // end Case& cf_DNA_Polymerase( size – 1 ); // decrement the “size” parameter by one after each recursion
“”
) // end Case
) // end Let
So using a parameter for 100 should return a sequence like this:
cf_DNA_Polymerase ( 100 )
AGACTAACCTTGTTCGCATTCCCTGCGGTAGTCAAGATTACTCCCTAGCTACTTCCTAAAA
GCGTTCGGTTCCGCAGATTGTACTCTACTCCAGAGGCAG
Compensation and 23andMe’s $99 DNA Sequencing Kit
// July 21st, 2009 // Comments Off // Sequencing, Web 2.0, biology
Last week Web 2.0 genetic analysis company 23andMe announced a “Research Edition” $99 genetic kit for analyzing your DNA. The cost of the kit is discounted from the regular price of $399 which is their Full Edition kit.
From the company’s perspective, one of the intentions for the discounted kit is to get enough people to submit samples. Quantitatively speaking, enough samples and data, would validate 23andMe’s business process for the scientific community and anyone who may partner with them for sequencing genomes in the future. I’m not entirely convinced that their current business model for achieving this will work. Customers have to pay the company to submit samples and retrieve data. Sure they are provided a service to better understand their ancestry, predisposition to diseases, genealogy, and inherited traits but is the service worth $99? Time will tell. 23andMe should take the approach biotech and pharmaceutical companies use for generating data on their experimental drugs and studies. This involves clinical trials, where patients are usually compensated monetarily, covering time and costs, for their participation. Following this model, 23andMe could obtain many more samples and data to achieve its goal. They could provide the service free of charge to customers in exchange for their samples until they received enough of them to validate their business model.
It’s not the inhibition of the HOX gene pathway!
// June 25th, 2009 // No Comments » // amphibian, biology
Dragonfly Nymph Bites Off Tadpole Hind Limb
Biology at work not pollutants.
FileMaker Custom Function for Translating a DNA Sequence to an Amino Acid Sequence
// May 29th, 2009 // Comments Off // Custom Function, FileMaker, FileMaker Biotech
Recursive custom functions in FileMaker Pro can be used in calculation fields for translating a DNA sequence into its amino acid sequence. In the example below, the custom function recursively works on a DNA sequence’s triplets (codons) translating each triplet into a single letter amino acid.
Here’s the custom function’s name and parameter:
cf_translate_DNA( sequence)
Here’s the code:
Let(
seq = Left( sequence; 3 );
Case(
Length ( sequence ) ;Case(
seq = “TTT”; “F”;
seq = “TTC”; “F”;
seq = “TTA”; “L”;
seq = “TTG”; “L”;seq =”TCT” ; “S”;
seq =”TCC” ; “S”;
seq =”TCA” ; “S”;
seq =”TCG” ; “S”;
seq =”TAT” ; “Y”;
seq =”TAC” ; “Y”;
seq =”TAA” ; “*”;
seq =”TAG” ; “*”;
seq =”TGT” ; “C”;
seq =”TGC” ; “C”;
seq =”TGA” ; “*”;
seq =”TGG” ; “W”;seq =”CTT” ; “L”;
seq =”CTC” ; “L”;
seq =”CTA” ; “L”;
seq =”CTG” ; “L”;seq =”CCT” ; “P”;
seq =”CCC” ; “P”;
seq =”CCA” ; “P”;
seq =”CCG” ; “P”;seq =”CAT” ; “H”;
seq =”CAC” ; “H”;
seq =”CAA” ; “Q”;
seq =”CAG” ; “Q”;seq =”CGT” ; “R”;
seq =”CGC” ; “R”;
seq =”CGA” ; “R”;
seq =”CGG” ; “R”;seq =”ATT” ; “I”;
seq =”ATC” ; “I”;
seq =”ATA” ; “I”;
seq =”ATG” ; “M”;seq =”ACT”; “T”;
seq =”ACC”; “T”;
seq =”ACA”; “T”;
seq =”ACG”; “T”;seq =”AAT”; “N”;
seq =”AAC”; “N”;
seq =”AAA”; “K”;
seq =”AAG”; “K”;seq =”AGT”; “S”;
seq =”AGC”; “S”;
seq =”AGA”; “R”;
seq =”AGG”; “R”;seq =”GTT” ; “V”;
seq =”GTC” ; “V”;
seq =”GTA”; “V”;
seq =”GTG”; “V”;seq =”GCT”; “A”;
seq =”GCC”; “A”;
seq =”GCA”; “A”;
seq =”GCG”; “A”;seq =”GAT”; “B”;
seq =”GAC”; “B”;
seq =”GAA”; “E”;
seq =”GAG”; “E”;seq =”GGT”; “G”;
seq =”GGC”; “G”;
seq =”GGA”; “G”;
seq =”GGG”; “G”;“”
) // end Case
& “ “& cf_translate_DNA ( Middle( sequence ; 4 ; Length( sequence ) ) );
“”
) // end Case
) // end Let
The custom function “cf_translate_DNA” reads through a sequence in triples until it gets to the end of the sequence. So if the sequence is:
AAATAGCCC
the first time the entire sequence gets passed through the function. The resulting amino acid is:
AAA = K
The sequence that gets passed through the second recursive loop is:
TAGCCC
this is because of this part of the function: cf_translate_DNA ( Middle ( sequence ; 4 ; Length( sequence ) ) );
The resulting amino acid for the second loop is:
TAG = *
and finally the function ends with
CCC = P
Resulting in an amino acid sequence of:
K * P
Remember the function only looks at the first triple (codon) and builds the amino acid sequence that way.
Recursive custom functions should always have a method for stopping the recursion. In the example above the first Case statement checks the length of the input parameter “sequence” . If there is no more sequence left ( which occurs after the last loop through the function ), then Length( sequence ) returns 0 and the recursion halts.
Refreshing a Filtered Portal Using Script Triggers in FileMaker Pro 10
// April 29th, 2009 // No Comments » // FileMaker, Filtered Portals, Script Triggers
Filtered Portals are a powerful technique used for displaying data in FileMaker Pro. A user experience issue in using filtered portals however, is the fact that after entering text into a filter portal key field, the user must manually commit the record in order to have the portal refresh. This usually involves clicking out of the field or committing records with a button. This is no longer the case thanks to FileMaker 10 and Script Triggers. Here’s the set up:

Australian Rainforest Frogs Filtered Portal
-
Create a relationship using a global key field on the left side and relate it to an indexed calculation key field on the right. Note: the calculation field uses a couple of recursive custom functions which decompose the data into its alphanumeric characters, creating a multi-tiered key. In this relationship we are relating the FRG__Frog table to itself using the filter key and the calculated text field.

A Relationship Between the Filter Key and an Indexed Calculation

Multi-tiered Recursive Calculation Decomposing Text Strings
-
Create a script using the “Set Field” script step, which sets the global filtered portal key field to itself.

-

Filtered Portal Script Trigger
Set the “OnObjectModify” Script Trigger events on the filter key field using the above script. This will fire off the script and refresh the portal every time the filter portal key field is modified.
Download the file.
U.S. State Abbreviations
// April 27th, 2009 // Comments Off // code
One thing I can never easily find on the web are abbreviated names of U.S. States; a simple list delimited by carriage returns- that’s all I want. So, here they are- thanks javaprogrammer
AL
AK
AZ
AR
CA
CO
CT
DE
FL
GA
HI
ID
IL
IN
IA
KS
KY
LA
ME
MD
MH
MA
MI
MN
MS
MO
MT
NE
NV
NH
NJ
NM
NY
NC
ND
OH
OK
OR
RI
SC
SD
TN
TX
UT
VT
VA
WA
WV
WI
WY



