one layout

one layout

am 12.09.2007 22:09:33 von Shawn Hamzee

Hello,

I am on osx, filemaker 8.

my question revolves around utilizing the same layout by two different but
similar tables. is it possible to change how a layout retrieves data in
runtime? another words, can i use the same layout (maybe with the help of a
script) to show data from two different (but similar in structure) table?

thanks much in advance.
--
POST BY: lark with PHP News Reader

Re: one layout

am 12.09.2007 23:20:19 von ursus.kirk

By using a third table that utilizes a relationship and a lot of
calculations you could achieve this.
One field that hold the Source Key (TableA or TableB). Within tableA and
TableB there is a constant that holds A or B
create two relationships SourceKey::TableAKey and SourceKey::TableBKey
Then for each field you want to show create a calculation. The basics are
IF ( SourceKey = "A" ; TableA::SomeField ; TableB::SomeField )

Then by just changing A into B for the SourceKey field the calculations
should change table.

But in my opinion it would be far simpler to just duplicate layout1 and just
substitute the fields. I can see no reason against this.

Keep well Ursus
"lark" schreef in bericht
news:1IXFi.6975$JD.4233@newssvr21.news.prodigy.net...
> Hello,
>
> I am on osx, filemaker 8.
>
> my question revolves around utilizing the same layout by two different but
> similar tables. is it possible to change how a layout retrieves data in
> runtime? another words, can i use the same layout (maybe with the help of
> a
> script) to show data from two different (but similar in structure) table?
>
> thanks much in advance.
> --
> POST BY: lark with PHP News Reader

Re: one layout

am 12.09.2007 23:24:52 von d-42

On Sep 12, 1:09 pm, lark wrote:
> Hello,
>
> I am on osx, filemaker 8.
>
> my question revolves around utilizing the same layout by two different but
> similar tables. is it possible to change how a layout retrieves data in
> runtime? another words, can i use the same layout (maybe with the help of a
> script) to show data from two different (but similar in structure) table?
>
> thanks much in advance.

No.

Each layout is inextricably bound to a Table occurence which is
inextricably bound to a Table.

That said, you could create a 3rd table, base the layout on that, and
import the records you need from either of the first tables. If you
are dealing with small record sets this is acceptable, its not good
for large record sets due to the import performance.

But Its usually, but not always, preferable in filemaker to just make
2 similiar layouts.

Also, as a 3rd option, sometimes the the best soluition is to merge
the two similiar tables into one table. You'll have different 'record
types' and some fields will be empty for each record type, and good
data modelling teaches us to avoid doing this -- but sometimes its
still the best solution.

cheers,
Dave