[FX.php List] Is there an FMTableNames()?

Gjermund Gusland Thorsen ggt667 at gmail.com
Mon Aug 4 01:05:23 MDT 2008


So you have made your own separate abstraction layer of the FX.php
abstraction or logic for that abstraction layer is maybe a better
term, I still do not see why you need table names... it will most
likely break the relationships used.

2008/8/4 Jonathan Schwartz <jschwartz at exit445.com>:
> The data separation model....or at least my attempt at creating one...has
> been a self-learned evolution.
>
> I would love to have a thread to discuss the how's and why's.
>
> Here's my story:
>
> I have on multi-function php page that I use with all my solutions. It
> provides:
>        - Multi-field Search Form
>        - Display Listing
>        - Bi-rectional Sorting (only single sort field right now)
>        - First/Next/Prev/Last  page navigation
>        - Display Detail
>        - Edit record
>        - Add record
>        - Delete record
>        - Multi-table/Multi-file navigation
>        - Download to Excel.
>
> The single page, the source of which germinated from Steve Winter's generous
> help 2 years ago, was a solution to the problem of having separate pages for
> each of the various functions listed above.  A single page, while much more
> complex, keeps the work down.
>
> By using variables throughout the page, defining everything:  FM file,
> layout, field list, field formatting, field alignment, etc, etc..., the one
> file can serve solution.
>
> My first attempt at this was to create a separate variables page for each
> solution. It is much like the familiar server_data file we all use, except
> that this has 50 variables to serve the multi-function page.
>
> Afer that, I decided to join the separate solution variable pages and keep
> everything in one single variable page, using if statements to select the
> correct set of 50 variables.
>
> This works great, except that the job of editing the solution involved
> editing row after row of arrays in the variables page in BBedit.
>
> So, off I went to the next step: committing the variables to a single FMP
> "variable" database. When the solution starts up, it queries the database
> for the needed variable values. It then writes the arrays out to temporary
> variables. The multi-function page uses those temporary arrays. This last
> step allows me to define the data in FM...a much easier process.
>
> The next challenge, I had to manually add the fieldnames into the database.
> I did that for the first solution. Then, I realized that FM could do it for
> me.  By using the FMDBNames, FMLayouts and mining the FMFinf query for filed
> names, I am building the ability for my system to interrogate all the files
> on my server and populate itself with every field on every (web-related)
> layout.
>
> The last step: webifying the access to the variables database so that I or
> an authorized user can completely redesign the multi-function page (within
> reason), having the benefit of adding , moving or removing data
> fields...because these have all been previously defined in the variable
> database.
>
> Phew!
>
> So, ggt, that's why I need to identify the Table name.  for a given
> solution, my variables database lists a field, a layout, a table and a file
> to uniquely identify the right record(s).
>
> Now, you would be correct to say that a layout alone should be sufficient
> (without the Table Name) because layout names should be unique, but FMP
> allows duplicate layout names.
>
> So, that's the way I did it.
>
> How do yo do it?
>
> J
>
>
>
>
> At 2:01 AM +0200 8/4/08, Gjermund Gusland Thorsen wrote:
>>
>> I always user data separation, however there are usually several
>> instances of each table,
>> however FileMaker always makes the first instance of a table as a layout
>> too....
>>
>> g
>> g
>> t
>>
>
> --
> Jonathan Schwartz
> Exit 445 Group
> jonathan at exit445.com
> http://www.exit445.com
> 415-370-5011
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>


More information about the FX.php_List mailing list