dbTalk Databases Forums  

Exporting container fields to specified location

comp.databases.filemaker comp.databases.filemaker


Discuss Exporting container fields to specified location in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Sharky
 
Posts: n/a

Default Exporting container fields to specified location - 11-09-2005 , 04:43 AM






Hi,

I'm trying to set up a database in wich different user can add digital
images from their digital cameras. I don't want to link the container to the
content, because if the camera is gone, the link is broken. I also don't
want the files to be embed in the database because it soon will have a very
large filesize.
Therefor I want Filemaker to store the content of the container field
automatically in a specific location (directory). I thought this could be
done with the "exporting field" script but I can't specify a specific
directory in Filemaker.
Using the export field command only works with a dialog box, but in this
case the user will have to specify the destination directory and I want to
run the script without a dialog box.

This is how it should work:
1 - User hits the import button
2 - Dialog box pops up and user select the file to import
3 - FileMaker copies the file to a specific location (no dialog box!)
4 - FileMaker shows the image in a container field using a link to the new
storage location.

Sounds simple, doesn't it??

Newbe from Holland, Using FMP8

Sharky



Reply With Quote
  #2  
Old   
FP
 
Posts: n/a

Default Re: Exporting container fields to specified location - 11-09-2005 , 10:04 PM






It does sound simple but FileMaker is a database.
It would be nice if it could create move, create, and delete files &
folders but it can't.
Try the Troi-File Plugin.


Reply With Quote
  #3  
Old   
Howard Schlossberg
 
Posts: n/a

Default Re: Exporting container fields to specified location - 11-09-2005 , 11:01 PM



In FM8, you should be able to set a variable to your desired folder path
and file name, and then use the variable name (i.e. $$FilePath) as the
destination in your Export script step.

For your link, just be sure to store the path and file name in a text
field after you've imported it. Clear the container where the user
placed the original image, and then import from that location as a
reference link only.


Sharky wrote:
Quote:
Hi,

I'm trying to set up a database in wich different user can add digital
images from their digital cameras. I don't want to link the container to the
content, because if the camera is gone, the link is broken. I also don't
want the files to be embed in the database because it soon will have a very
large filesize.
Therefor I want Filemaker to store the content of the container field
automatically in a specific location (directory). I thought this could be
done with the "exporting field" script but I can't specify a specific
directory in Filemaker.
Using the export field command only works with a dialog box, but in this
case the user will have to specify the destination directory and I want to
run the script without a dialog box.

This is how it should work:
1 - User hits the import button
2 - Dialog box pops up and user select the file to import
3 - FileMaker copies the file to a specific location (no dialog box!)
4 - FileMaker shows the image in a container field using a link to the new
storage location.

Sounds simple, doesn't it??
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Pro Solutions Los Angeles, California

FileMaker 7 Certified Developer
Associate Member, FileMaker Solutions Alliance


Reply With Quote
  #4  
Old   
Sharky
 
Posts: n/a

Default Re: Exporting container fields to specified location - 11-15-2005 , 03:16 AM



Anyone ???


"Sharky" <mistermister2003 (AT) hotmail (DOT) com> schreef in bericht
news:b2484$4374d314$3ec2a2bb$9423 (AT) news (DOT) chello.nl...
Quote:
Thanks for your help, but this is really new to me... I tried both ways,
but can figure out a good script yet.

I've attatched an ZIP file containing an example and the Troi-File Plugin
(demo version). Is there some one who can help me with the script, so I
can study on the script? It should work like this:

1 - Push the button to select a picture to be imported to the container
2 - Picture will be loaded by FMP in the container
3 - FMP will make a copy of the file and save it in a specified location
(map), using the same filename and extension
4 - FMP will delete the content of the container
5 - FMP will show the picture via a link to its new location

Step 2 to 5 should run without a dialog.

Thanks for your help!!

Sharky


"Howard Schlossberg" <howard (AT) antispahm (DOT) fmprosolutions.com> schreef in
bericht news:11n5l4ddurimi58 (AT) corp (DOT) supernews.com...
In FM8, you should be able to set a variable to your desired folder path
and file name, and then use the variable name (i.e. $$FilePath) as the
destination in your Export script step.

For your link, just be sure to store the path and file name in a text
field after you've imported it. Clear the container where the user
placed the original image, and then import from that location as a
reference link only.


Sharky wrote:
Hi,

I'm trying to set up a database in wich different user can add digital
images from their digital cameras. I don't want to link the container to
the
content, because if the camera is gone, the link is broken. I also don't
want the files to be embed in the database because it soon will have a
very
large filesize.
Therefor I want Filemaker to store the content of the container field
automatically in a specific location (directory). I thought this could
be
done with the "exporting field" script but I can't specify a specific
directory in Filemaker.
Using the export field command only works with a dialog box, but in this
case the user will have to specify the destination directory and I want
to
run the script without a dialog box.

This is how it should work:
1 - User hits the import button
2 - Dialog box pops up and user select the file to import
3 - FileMaker copies the file to a specific location (no dialog box!)
4 - FileMaker shows the image in a container field using a link to the
new
storage location.

Sounds simple, doesn't it??

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Pro Solutions Los Angeles, California

FileMaker 7 Certified Developer
Associate Member, FileMaker Solutions Alliance






Reply With Quote
  #5  
Old   
Dan Fretwell
 
Posts: n/a

Default Re: Exporting container fields to specified location - 11-15-2005 , 07:18 AM



I think Howard gave you the solution. But to be explicit: write the
following script (this is designed for windows and sends the contents
to the current user's desktop with a fixed filename- but all of this
can be done in a calculation field.)

Set Variable[$$filepath: Value :"filewin:" & Get(DesktopPath) &
"filename.jpg"
Export Field Contents [sendit:icture;"$$filepath"]

You are using the variable $$filepath to specify where the file goes
and the name of the file and this is a calculation. In the Export Field
Content specify the (container) field that you are exporting I've
called it picture in the table sendit and then in the filepath dialog
box type $$filename - the name of the variable NOT its definition. This
script will do the exporting - step 3 in your list.

Step 4 can, I think, be done by SetField[sendit:icture;$$filename].


Reply With Quote
  #6  
Old   
Dan Fretwell
 
Posts: n/a

Default Re: Exporting container fields to specified location - 11-15-2005 , 09:51 AM



It seems that Set Field does not work try Insert File instead. There is
another thread here Insrting Files from folders that might be worth
looking at as well.


Reply With Quote
  #7  
Old   
Sharky
 
Posts: n/a

Default Re: Exporting container fields to specified location - 11-17-2005 , 08:25 AM



Thanks Dan, I got it finally running!

"Dan Fretwell" <dan (AT) owlsnet (DOT) co.uk> schreef in bericht
news:1132069906.468010.75700 (AT) g43g2000cwa (DOT) googlegroups.com...
Quote:
It seems that Set Field does not work try Insert File instead. There is
another thread here Insrting Files from folders that might be worth
looking at as well.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.