Re: AS & Filemaker Pro
Re: AS & Filemaker Pro
- Subject: Re: AS & Filemaker Pro
- From: "Gary (Lists)" <email@hidden>
- Date: Fri, 14 Jul 2006 17:39:16 -0400
"Bob Cuilla" wrote:
> Does anyone know how AS determines the order of fields when getting data from
> a Filemaker record? Is sort od seems like it depends on the placement of the
> fields on the layout you are extracting data from.
>
> Can anyone confirm this?
"Gary Tate" wrote:
> Yep, that's it. Although I think it's actually based on the stacking order, so
> if you move things forward or backwards I THINK it'll chance the order.
>
> Gary
I did not recall whether the Tab Order (as from the Layout menu) or the
"stacking order" (the front-to-back sending of objects, as from the Arrange
menu) had much to do with the order of values in a 'current record' result.
So, I did a few tests in FM 7.
I found that Tab Order, as remembered, had no impact on the field result
order.
Also, I found that "stacking order" was irrelevant, _UNLESS_ the objects are
identically aligned in the window, in which case the one which is farthest
"back" is returned first, in continuing order, up to the "top" field.
So, the Other Gary raised a good point: be well aware of the factors
affecting field result order, but the vertical screen coordinate order is
more important than "stacking order" in this case.
A couple of general thoughts, from experience...
1) It's often been helpful to me to create the layouts I need for script
operations, and exclude these layouts from the menu. Additionally, it's
fast to create them (just select 'blank' style or some other column or list
style) and don't worry with any UI (maybe a header on all that says "Dev
Layout" or something.)
2) Layout 0 still works in FM 7, and this always returns record data in the
Field Creation order. I thought (but did not test) that in some earlier
version of FM (5? 6?) that "layout 0" returned data in the currently listed
Field Order (which could be 'Custom' or 'Creation Order' or 'By Name', etc.)
This is NOT the case in my FM 7 -- field display order in the Define window
has no bearing on the test result.
(Altering the Field Order in the Define window does have impact on some
other operations, however. Just not on "layout 0".)
>From my own experience with many small to medium and two very large
FileMaker + AppleScript projects, I would suggest that you create layouts,
with fields order vertically only, or horizontally in a table/list view,
that are created for specific script operations. In the large scale
projects, this was very helpful for collaborative work, since anyone could
find the layout associated with a given handler -- the handler was noted in
the layout header.
(Some people I know use a static join file to connect to every other file
which will be accessed via AppleScript. Then, the layouts for each usage are
created in the join file, with related fields. This makes writing the cell
names more cumbersome in the AppleScript, I think, and so I don't use this
method. But it does suggest that the rapid ability to "grab" a bunch of
records, in AS list form, is useful and generally quick and that the process
can be controlled in any number of ways to maintain field order in the
resulting list.)
--
Gary
_______________________________________________
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