Jump to content
Philip Jenks

Opening Mail files in container fields

Recommended Posts

Hello

If I put a JPG file in a container field, and then run a script which Exports the field contents, with the 'automatically open file' option ticked, the stored file opens up in Preview. If I do the same thing with a Mail email file, it opens up in TextEdit.

I'm wondering whether it is possible to specify the application in which a file is opened, depending on the filename. i.e.

'If the file you've just exported, ends in .doc, open it in Word; if it ends in .jpg, open it in Preview; if it ends in .eml, open it in Mail'

Don't suppose anyone knows how to do that?

Thanks

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By Scotty Nordlund
      After upgrading to MirrorSync 3 from 2, I can no longer sync container fields.  During the reconfiguration process, I get the tooltip in the uploaded image below.  The tooltip says "Neither field is writable.  This could be because they are calculation or summary fields. It could also be caused by field-level validation or custom access privileges.".  These container fields are not calc or summary fields.  There is no field level validation or custom access privileges that I know if.  They are full access, and the fields have not changed since my last MirrorSync 2 configuration.  Please help!

    • By Cyrus
      I'm using Filemaker Pro 11 in Windows 7, trying to automate the exporting of files from container fields.  I've written a script that goes through all the records to export the files in the container fields while skipping empty container fields.  The code works well, except that there are a number of records with container fields where I get the "Container fields cannot be exported." error.  When I try go to these records and try manually exporting the container field contents by right clicking, the "Export Field Contents..." option is grayed out, though I am able to open the document and then manually save it.  There are, however, way too many of these cases for me to practically do this one by one, so I'm hoping if someone has an idea what's going on here and how I might be able to automate the exporting of these fields that are giving me this error.
       
      To help me troubleshoot this, I wrote a shorter code that focused on exporting the field contents of just one record.  This helped me figure out which records were giving me this error.  Here's the code:
       
      If[not(isEmpty(TABLENAME_::FIELDNAME))]
           Set Variable [$filePath; Value:"filewin:" & Get(DocumentsPath) & TABLENAME_::TABLE_ID_FIELD]
           Export Field Contents [TABLENAME_::FIELDNAME; "$filePath"]
      End If
       
      I've been searching and trying a bunch of different things, but with no luck.  Any tips and pointers would be greatly appreciated.
       
      Thanks!
    • By Miss A!
      Hello Forum,
       
      Anybody with a solution or understanding as to why FM crashing when browsing records on layouts that have container fields?
       
       
    • By Steve Martino
      Hello forum,
      I had a few questions regarding inserting, then retrieving a PDF from a container field.  Scripts attached.
      What I have is a table for Customers related to a table Customer_contact.  In the Customers Table I have a layout/procedure to write letters to customers, either individually, or in bulk.  Then print. What I would then like to do is have the option (in the Customer_contact table) to either just put a record of the contact (date, which letter sent) or save a copy of the entire letter in a container field as a PDF.  The reason for the 2 options are I only really want to save the letters that are related to unpaid invoices, not the bulk letters, newsletters, etc.
      So I came up with these 2 scripts to save and retrieve.  It does work, but I read up on saving to a temporary path to embed the pdf into the container field, but I am confused by the method.  So when my script runs, it does what I need it to do, but leaves an untitled.pdf file on my desktop (which I don't like, but I did script it that way).  It does work but I always wonder if it is correct, and if there is a better way.  I do want to embed the pdf's into the container, not store remotely
      My questions are:
      1.  Is the first script correct (the steps with the arrows specifically, but overall too)
      2.  Is the second script correct for retrieval?  Obviously if I have to change the first script, the second will need updating.
      Any help, opinions, ridicule, pointers, are always appreciated.
      Thanks
      Steve
      PS.  I'll always be the only user, so record locking with the loop script wont hurt me, but if an alternate method is better, I'm always interested in learning

    • By Wickerman
      I am working on an iPad solution designed to browse an art collection.   A container field will display the work of art and there will be some descriptive fields beneath it.
       
      Very frequently, the user will want to view the image 'full screen' by tapping on it.  This works great, but in this case it's unfortunate that there's an intermediate step where the user is to select from a number of Actions' -- which includes the 'View' option I want.  This layout won't be intended for doing anything but viewing the art (no need for replacement, deleting, etc.).
       
      So, my question is whether there's a way of omitting that intermediate 'Action' step so that the use can simply tap once to view the large image?
       
      Albert
  • Who Viewed the Topic

×

Important Information

By using this site, you agree to our Terms of Use.