Re: Saving Folder Structure's for FMP
Re: Saving Folder Structure's for FMP
- Subject: Re: Saving Folder Structure's for FMP
- From: Xandra Lee <email@hidden>
- Date: Sun, 25 Aug 2002 20:54:45 -0400
On 08/23/2002 2:18 PM, "ken" <email@hidden> wrote:
>
My question is about how to store the folder structure of the files. I
>
can always just store the absolute path for each file in a text field,
>
but I was wondering if anyone had any better ideas.
>
>
One problem with just storing the absolute path with each file is
>
when searching, I will want to have the users be able to "see" the
>
folder structure. I'm guessing I'll have to accomplish this with AS
>
and parse the paths back to a heirarchy, but I'm not really looking
>
forward to that.
>
You can use FMP Calc fields to accomplish this. Roughly you'll need 2
fields:
First use the "position" (text) function to locate colons or slash marks in
-- (depending on how you're entering paths) your "Path" field
For example:
Field ONE:"SecondColon"
Position(Path, ":", 1, 2)
Position (text, search string, start, occurrence)
Gets the location of the second colon found within the field "Path"
(beginning it's count from the 1st letter of the field)
2> Then for each level of folder you wish to search in, you'd grab the text
to left of the position of the colon (using the "Left" Text Function.
Field TWO: "RootFolder"
Left(Path, SecondColon)
Left (text, number)
--> first 12 characters of the path
Given the full path:
"Jaz:Archive:MiniPrograms Archive:BBEdit1.2.sit"
"SecondColon" --> 12
"RootFolder" --> "Jaz:Archive:"
----------------------------------
The primary thing you'd want to determine, is what level(s) you wish to
users to search. It would be easiest if this is fairly consistent.
You can also use calcs like these (by combining the "right" and/or "middle"
functions) to generate folder names in addition to partial paths. To make
things a bit more user friendly.
Lastly With a bit of effort you can even generate reports which look
something like the Finder.
One word of caution, FMP only indexes about 20(?) consecutive characters
(without a space or other word breaking character) and some number (I forget
how many) Total characters per field -- so be sure to include some broken up
version of paths for search purposes.
I probably have some sample databases around if this doesn't make sense to
you.
HTH,
xandra
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.