FM php -record tree
In some cases FileMaker record tree view is very useful to quickly browse through records.
We have several FileMaker solutions described by Matt Petrowsky (http://www.filemakermagazine.com/videos/unlimited-infinite-hierarchies.html) or Mikhail Edoshin (http://edoshin.skeletonkey.com/2008/07/hierarchies-in.html) etc.
If we go to PHP, there is a different picture – mentioned techniques cannot be so easy applied to PHP.
I have combined PHP tree menu – described by Agner Fog (www.agner.org/software/phpmenu/) with standard FileMaker PHP Assistant generated result to achieve record tree view in web browser.
Requirements for solution:
- uploaded to FileMaker 9, 10 Server FileMaker file FMSchedule.fp7, PHP publishing enabled,
- Apache webserver (Mac OS X by default – sharing ON),
- uploaded to webserver PHP files (MAC OS X – copied to MacintoshHD/Library/Webserver/Documents/)
- Safari 4 or Firefox 3.5 browser (not tested on IE or earlier Safari and Firefox versions).
In this case I use localhost – Apache server, FileMaker Server and FileMaker is installed on the same machine.
Tree structure is defined by In FileMaker file FMSchedule.fp7 script “NodeID” setting correct RecordID’ s order in field “H_Web“and processing sequence is PHP file recordlist*****.php file code. Record tree level is determined by dots before f ield “Name” content.
There are 3 differnet PHP files:
recordlist.php use the same technique as PHP Assistant generated PHP file – “for each...” record by RecordID echo necessary fields (organized in table). For each record query is send to server and get response. Process is “slow” when more then 25-30 records must be viewed. To achieve some speed, typically are used buttons “Pervious” and “Next”. To represent graph iFrame is added.
Screenshoot:
recordlist_f.php use FileMaker API Compound Find command – visible tree folders and nodes determine “must be found by RecordID” records. Process is much faster.
Screenshoot:
recordlist_f_g.php in general is the same as recordlist_f.php – to represent graph iFrame is added.
Screenshoot:
In all files a pop-up javascript window is added. Such window is very useful to quickly browse through record and records and edit them if necessary.
More detailed video will follow.
You can support me by choosing and buying a coffee to me via PayPal before downloading. Thank’s!
Stock Available: 1



