Article View: comp.sys.mac.databases
Article #141Re: Q: FM Pro Export to 4D: Handling Repeating Fields
From: Kaveh Baharestan
Date: Wed, 08 Apr 1992 00:48
Date: Wed, 08 Apr 1992 00:48
82 lines
3567 bytes
3567 bytes
R. Glenn Stauffer <stauffer@cc.swarthmore.edu> writes:
>I have an application that performs an inventory on a Macintosh computer
>and produces an
>export file that works with FileMaker Pro. Fields such as system inits,
>cdevs, and
>application software are stored in repeating fields. I recently got my
>copy of 4D and am
>trying to integrate this inventory system into a "help desk" application
>for tracking
>work orders and service calls.
>The problem that I am having involves getting these repeating fields into
>a 4D database.
>At this point, I'm assuming that the repeating fields would go into
>sub-files.
Don't assume that, do every thing you can to avoid subfiles! They suck.
and (in versions 1.0 and upto 2.0.1) have had a history of being extremely
buggy. Use relations.
> How do I
>perform the import operations on these fields? Is there any way to
>import a data file
>that has repeating fields in one piece (ie repeating and non-repeating
>fields together)
>or do I have to import the main database records first, then get the
>sub-file fields
>sub-file by sub-file?
4D has a a plethera(sp?) of methods to do this. You could use a set
of procedures where the RECEIVE PACKET(dococument,variable,delimiter)
command. Or you could import using import layouts. I prefer the
latter becuase of the flexability you gain, namely records imported
can have variable numbers of fields. The disadvantage of this method
of course is speed, ie complexity=time, receive packet>import. I am
reasonably sure that one could import virtually any type of file
provided the format was known and the programmer ingeniuos. I have
never done a non text file.
As for the order of entry, with the import i'm not sure, but with
receive, both cases you talked about above are possible.
The following:
FILE/////\n
SUBTYPE2///////\n
SUBTYPE1///////\n
SUBTYPE1////////\n
SUBTYPE2///////\n
FILE\n
SUBTYPE2///\nEOF
file format where each file and subfile is hearalded be a symbol
denoting what it is and where \n (char(13)) delimits all records
or subrecords, you need only parse for FILE or SUBTYPE[12] to know
what is to follow. Note that FILE and SUBTYPE[12] may be any symbol
or group of symbols.
>Thanks for any and all suggestions,
Remember, No subfiles!
>rgs
>/--------------------------------------------------\
>| R. Glenn Stauffer |
>| Micro-Computer Specialist |
>| Swarthmore College Computing Center |
>| 500 College Avenue |
>| Swarthmore, PA 19081 |
>| |
>| Internet: stauffer@cc.swarthmore.edu |
>| Compuserve: 70242,2603 |
>| |
>\--------------------------------------------------/
--
Kaveh.
+-----------------------------------------------------------+
| "...Its not the thing you fling, its the fling itself!" |
| Northern Exposure |
Technical Details
Message-ID:
<1992Apr7.204854.24459@ms.uky.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!ukma!kavehReferences:
<BSFHBFL2@cc.swarthmore.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.mac.databases Path: arc1-ca.pugleaf.net!sparky!uunet!ukma!kaveh From: kaveh@ms.uky.edu (Kaveh Baharestan) Subject: Re: Q: FM Pro Export to 4D: Handling Repeating Fields References: <BSFHBFL2@cc.swarthmore.edu> Message-ID: <1992Apr7.204854.24459@ms.uky.edu> Date: Wed, 8 Apr 1992 00:48:54 GMT Organization: University Of Kentucky, Dept. of Math Sciences Lines: 83