dbTalk Databases Forums  

email Container Field Script

comp.databases.filemaker comp.databases.filemaker


Discuss email Container Field Script in the comp.databases.filemaker forum.



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

Default email Container Field Script - 11-16-2005 , 04:36 PM






Is there anyway to build a script that would email a .jpg file out of a
container field using FM built in email client.

Thanks
JC


Reply With Quote
  #2  
Old   
Jens Rasmussen
 
Posts: n/a

Default Re: email Container Field Script - 11-17-2005 , 03:24 AM






JC <jc (AT) jclewis (DOT) biz> wrote:

Quote:
Is there anyway to build a script that would email a .jpg file out of a
container field using FM built in email client.
Yes, it is easy:
Database: Test
One table: Test
Two fields: Text, Billede (which means picture)
One script, two steps:

Mail (this is the name of the script)

Export Field Contents [ Test::Billede; "file:../Desktop/Billede999.jpeg"
]
Send Mail [ To: "no (AT) way (DOT) dk"; Subject: Test::Text; Attachment:
"file:../Desktop/Billede999.jpeg" ]
[ No dialog ]



This is done on Mac. You can of course save it to other locations than
the desktop. But this is the simple version.


Reply With Quote
  #3  
Old   
JC
 
Posts: n/a

Default Re: email Container Field Script - 11-17-2005 , 05:52 AM



Thank you for that, will it work if the name of the .jpg is different
each time?

Thanks
JC


Reply With Quote
  #4  
Old   
Bill Marriott
 
Posts: n/a

Default Re: email Container Field Script - 11-17-2005 , 08:31 AM



Jens' script specified the name of the output file (Billede999.jpeg), so
it's identical each time the script is run.

Bill

"JC" <jc (AT) jclewis (DOT) biz> wrote

Quote:
Thank you for that, will it work if the name of the .jpg is different
each time?

Thanks
JC


"Jens Rasmussen" <no (AT) way (DOT) dk> wrote

Quote:
JC <jc (AT) jclewis (DOT) biz> wrote:

Is there anyway to build a script that would email a .jpg file out of a
container field using FM built in email client.

Yes, it is easy:
Database: Test
One table: Test
Two fields: Text, Billede (which means picture)
One script, two steps:

Mail (this is the name of the script)

Export Field Contents [ Test::Billede; "file:../Desktop/Billede999.jpeg"
]
Send Mail [ To: "no (AT) way (DOT) dk"; Subject: Test::Text; Attachment:
"file:../Desktop/Billede999.jpeg" ]
[ No dialog ]



This is done on Mac. You can of course save it to other locations than
the desktop. But this is the simple version.



Reply With Quote
  #5  
Old   
Jens Rasmussen
 
Posts: n/a

Default Re: email Container Field Script - 11-17-2005 , 03:07 PM



Bill Marriott <wjm (AT) wjm (DOT) org> wrote:

Quote:
Jens' script specified the name of the output file (Billede999.jpeg), so
it's identical each time the script is run.
Yes. And as I understood the task the filename is of no importance,
because you have the pictures stored i FMP. I would select a folder
other than the desktop.


Reply With Quote
  #6  
Old   
JC
 
Posts: n/a

Default Re: email Container Field Script - 11-17-2005 , 03:22 PM



I may be confused. I have a container field that holds .jpg files A
picture of each customer. The file name is different in each record.
john.jpg, mary.jpg etc. So, I want to make sure I can make a script
to email that .jpg (regardless of name) out.

Thanks
JC


Reply With Quote
  #7  
Old   
Remi-Noel Menegaux
 
Posts: n/a

Default Re: email Container Field Script - 11-17-2005 , 03:41 PM



You should have a look at the Troi File plugin - www.troi.com -.
(sorry, Bill, I couldn't resist)
Remi-Noel


"JC" <jc (AT) jclewis (DOT) biz> a écrit dans le message de news:
1132262535.408904.106020 (AT) g47g20...oglegroups.com...
Quote:
I may be confused. I have a container field that holds .jpg files A
picture of each customer. The file name is different in each record.
john.jpg, mary.jpg etc. So, I want to make sure I can make a script
to email that .jpg (regardless of name) out.

Thanks
JC




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

Default Re: email Container Field Script - 11-17-2005 , 03:42 PM



JC wrote:
Quote:
I may be confused. I have a container field that holds .jpg files A
picture of each customer. The file name is different in each record.
john.jpg, mary.jpg etc. So, I want to make sure I can make a script
to email that .jpg (regardless of name) out.
If you have your script set a variable to the name of the image in your
container [i.e. set $pic = getastext(Container)], then you should be
able to script it so that you just use $pic as the saved attachment name
in the Send Mail script step.

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

FileMaker 7 Certified Developer
Associate Member, FileMaker Solutions Alliance


Reply With Quote
  #9  
Old   
Bill Marriott
 
Posts: n/a

Default Re: email Container Field Script - 11-17-2005 , 03:43 PM



Although FileMaker *is* keeping track of the file name of the JPG
internally, when you export it to a file, you'll be specifying the name in
the script. I would choose something generic like "attachment.jpg" or
"picture.jpg" -- or I believe some other threads here have illustrated how
to use variables to control such things.

Bill

"JC" <jc (AT) jclewis (DOT) biz> wrote

Quote:
I may be confused. I have a container field that holds .jpg files A
picture of each customer. The file name is different in each record.
john.jpg, mary.jpg etc. So, I want to make sure I can make a script
to email that .jpg (regardless of name) out.

Thanks
JC




Reply With Quote
  #10  
Old   
JC
 
Posts: n/a

Default Re: email Container Field Script - 11-17-2005 , 03:54 PM



I'be been resisting to on the plug-in!! But; from what I picked up on
another post that Howard had, I think between all three of you I can
get it done now.

Thanks a ton!


JC


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.