File Inventory Auto Enter
am 30.11.2007 01:13:26 von MattG
So I draft for a living for one company mainly. I have a pretty big
collection of drawings I have done and drawings I have come across.
There are other people in the company who want to see these drawings
so I am making an inventory.
The inventory has fields like
File Name:
Catagory
Date
Drawn By
Date Added
File Itself
File Location
File Size
Format
Now as I am adding these, is there a script or some way of having
filemaker know to...
If I add the file first take the file name of what I added and fill
that into the File Name field?
The Location that I am finding the file from, so I don't have to
retype it can it know where I grabbed it from and auto enter?
File Size, same as above, take the size of the file in the container
and fill that in the size field
File Format. There are different types of file extensions can it take
the file extension of the file I added and just put that in the field?
I am still learning so this may be something to laugh at, but I am
just hoping someone smarter than I could help.
Thanks,
Matt
Re: File Inventory Auto Enter
am 30.11.2007 13:29:48 von ursus.kirk
"mattG" schreef in bericht
news:b1aa8822-62f7-409c-9320-f6adcea7141e@a39g2000pre.google groups.com...
> So I draft for a living for one company mainly. I have a pretty big
> collection of drawings I have done and drawings I have come across.
> There are other people in the company who want to see these drawings
> so I am making an inventory.
>
> The inventory has fields like
> File Name:
> Catagory
> Date
> Drawn By
> Date Added
> File Itself
> File Location
> File Size
> Format
>
> Now as I am adding these, is there a script or some way of having
> filemaker know to...
>
> If I add the file first take the file name of what I added and fill
> that into the File Name field?
> The Location that I am finding the file from, so I don't have to
> retype it can it know where I grabbed it from and auto enter?
> File Size, same as above, take the size of the file in the container
> and fill that in the size field
> File Format. There are different types of file extensions can it take
> the file extension of the file I added and just put that in the field?
>
> I am still learning so this may be something to laugh at, but I am
> just hoping someone smarter than I could help.
>
> Thanks,
> Matt
Although with a lot of work most of this can be done I fist want to point
out that FileMaker is not a very good picture manager. It is not meant to be
very good at it and thus requires a lot of work to set up and probably a
plug-in for filesize recovery.
Here is how I do it. Short outline. The picture gets the ID number as a
reference for its name
Fields
ID < number ; auto-enter serial >
gImportPic < Global container >
cImportPicText < calculation ; text ; gImportPic >
cNamePic < calculation; text ;
Let ( [
A = Position ( cImportPicText; "¶"; 1; 1) ;
B = Position ( cImportPicText; "¶"; 1; 2) ;
C = B - A ;
D = Middle ( cImportPicText; A+7 ; C-7) ];
D)
cImportPathPic < calculation ; text ;
Let ( [
A = Length ( cImportPicText ) ;
B = Position ( cImportPicText ; "imagewin:/" ;1 ;1 ) ;
C = Right ( cImportPicText ; A - ( B + 9 ) ) ;
D = Substitute ( C ; "/" ; "\\" ) ] ;
D )
cPic < calculation ; container ; "image:./pics/" & GetAsText(ID) & ".jpg" >
cCMD < calculation; text ;
"cmd / c move " & cImportPathPic & "your_target_directory_here" & GetAdText
( ID ) & ".jpg" >
Layout
one layout Import, put the gImportPic on it. Make it 1x1 pixel, it needs to
be there, but you don't have to see it.
Put the cPic on it to view the pic.
One button that fires the following script
SCRIPT
New record
GoTo Field [MyTable::gImportPic]
Insert Picture [Reference]
Sent Event ["aevt";"odoc"; cCMD ]
Refresh Window
When all this is done and you fire the scirpt, it will ask where the picture
is. You find it and double click it. The script resumes and moves it to the
directory you specified and gives it a new name ( consisting of the ID ).
You will now see pic in the cPic field.
If you want file size you will need a plug-in, like the free FileToolbox
(mac os 9 and windows only, NO OSX)
http://www.geocities.com/SiliconValley/Network/9327/plPLUGs. html
Keep well, Ursus