MACSCRPT Archives

July 2006

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Gary (Lists)" <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Wed, 12 Jul 2006 10:23:16 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (53 lines)
"Mark Lively" wrote:

> It just hit me what the easiest solution probably is.

Ah, yes. The old "We Don't No Steenkin Export" Export plan.

I like. ;)

> It won't be quite as fast but...

But...this is a fine means of exporting some found set, and when the set is
generally small, then this makes an import-ready text file.

I think it's a reasonable stop-gap. Albeit with some limitations which may
or may not need attending, depending on the data in those field's "a", "b,",
"c".

> set {fa, fb, fd} to get {field "a",Field"b",field"d"}

Things I would think that need to be managed in a production level script of
this kind (which is a variation on the theme of 'dump records as lists'
feature of FM's AS implementation).

Things to watch for:
    
    lists that are too long (when record count or field count or both large)

    special characters inside text fields, and escaping if needed, depending
        on the final destination of exported data

    Unicode needs (FM 7 stores field text as Unicode, 6 does not ... IIRC)
        and depending on the final destination of exported data, this may
        or may not need to be addressed


    data order in the resulting list is field-order dependent, or, rather
        it is dependent on the layout which is targeted by the "tell",
        meaning that any output row's column order needs to be carefully
        planned and the script executed toward/against that layout always.
        (This used to be able to be handled by the "tell layout 0" method,
         and FM 6 can take advantage of that feature.)

         tell layout 0

            [Mark's lively script]

        end tell -- of 0


This could really save the OP some time.  Good idea, Mark.
--
Gary

ATOM RSS1 RSS2