Re: Filemaker Copy records
Re: Filemaker Copy records
- Subject: Re: Filemaker Copy records
- From: "Gary (Lists)" <email@hidden>
- Date: Tue, 04 Apr 2006 16:17:18 -0400
"Bob Cuilla" wrote:
> Has anyone had ever copied an entire record ( all fields) from one table to
> another?
>
> Thanks
>
> Bob Cuilla
Yep.
This is a very handy way to several things, especially when you consider
shades of meaning of "all records" (yes, that's more than "an entire
record" ;)
Single record...
...you can copy the entire record, and every field on the layout
contributes its data (you may need to verify whether on-layout Tab order or
field creation order is the ordering mechanism in newer versions of FM.
...you can then, via AS, "make new record with data TheBigKahuna" to
apply that entire record to some other place.
Multiple records...
...in a found set of records, you can copy all records. Now that may not
seem all that practical, until you realize that the layout from which you do
this can contain all or just a few or just one field. This is the very
method I use to provide a "Save and Restore Found Sets" feature in some
(many) files. (This is available on the web, if you want, as a fully open
tutorial file.)
Just experiment, Bob, with layout choice and field order. I find it most
helpful to have a special layout, that need not be physical navigable by a
human (i.e., not in the layout menu as per layout creation tick box). Then,
when I do "bulk" tasks like this, I know I'm on a controlled layout.
On this 'special layout', I simply use the automated layout maker to add all
fields, so that they are in a descending arrangement, with none even to the
left or right of others. This can be done with a click in the New Layout
box.
This way, I know the field order, because when you use the "make new record"
with your TheBigKahuna variable that contains loads of data, that's in the
form of a list, sans-field names, but the one-to-one order matching is what
puts data into the correct place.
There was (and still is, but its different, because of multiple tables in a
single file) a special layout called "Layout 0" which behaved as if were
constructed as I describe. The fields are "on" the invisible magic layout
in the order they then appear in the field order box -- which can change
over time, if you change it in "Define Database", of course.
You can still use "Layout 0", but it only applies to the first defined table
in the file. Not as useful as before, so I go with the "special layout that
I make" for each table, which contains all my fields, as I described.
Okay. HTH.
--
Gary
(And let me know if you want to download that 'Save and Restore Found Sets'
file, which uses this "copy" and "make" method to save a list of all
currently found record Ids for later restoration. The query itself is not
re-applied, but the then-found set is restored. It only works with Mac,
since it relies on this "make new record with data" AppleScript.)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden