Jump to content
bushidobro

export container contents of found set

Recommended Posts

Hi, new to supercontainer. I have a dataset with over a 100,000 images in a Filemaker container (v16 on FMServer). I am trying to find a method that allows an individual to download images from a found set all at once. I've been able to get a script working within Webdirect but it seems to require selecting a button to download images one at a time which is not convenient to say the least if you have 100 or so in a found set. 

Does supercontainer allow this sort of download?

Thanks.

Share this post


Link to post
Share on other sites

If you have Webdirect running, you might also be able to host a PHP file and have it do some work as well. I have some sample files that show how to zip container data and serve it to the end user as one file.

You can download the sample from my github repo here:

https://github.com/SoliantMike/FM-WebDirect_Zip

Mike

Share this post


Link to post
Share on other sites

Hi bushidobro,

While you could def do this with SuperContainer companion plugin, it would definitely take some set up as there is no functionality that would do this explicitly. The images would have to be hosted by SuperContainer first then have some kind of field for the record that uniquely identifies the image so that when you looped through the records you could change the URL where the image was hosted so SuperContainer would know what to download. For instance say you have a found set of 5 images with identifying values of 1-5 (super simple). To set this up you would upload those 5 images at http://SERVERIPORHOSTNAME/SuperContainer/Files/Images/1, http://SERVERIPORHOSTNAME/SuperContainer/Files/Images/2, http://SERVERIPORHOSTNAME/SuperContainer/Files/Images/3, http://SERVERIPORHOSTNAME/SuperContainer/Files/Images/4, http://SERVERIPORHOSTNAME/SuperContainer/Files/Images/5. In your script your loop would iterate through the found set and call the function SCDownload ("/Images/"&Images::ImageIdentifier; "LOCATIONWHEREYOUWANTTOSAVE") for each record in the found set.  Since you have 100,000 images, I would also recommend setting of a script that will automate the upload for you as well. The function SCSetContainer uploads a file from a container field to the specified URL on SuperContainer. 

Hope that helps!

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 wedgeman
      So i'm dealing with two tables.
       
      1.  VisitTable.
      2. GraphicsTable
       
      in a VisitTable layout, i have one or two portals related to the GraphicsTable, each related by a different factor.  One portal would be related by a Date field, the other would be a ClientName field..
      My desire is to click on a thumbnail in either one of these portals, and have that selected image be displayed in a separate/larger image window (which could be a container field in the current table, Or another portal?  I don't care how - i just need to have it show up) 
      I don't know the best method for doing this (ie., click thumbnail to have image fillin a separate location).  In this particular instance, I don't want this to be a separate window, but to display in a container field view on the current window/layout. 
       
      how do I accomplish this?
      thx
       
       

    • By BruceB
      I am trying to display an image (from disk) in a web viewer.
      The following is the calculation entered into the web viewer (by means of a calculation):
       
      data:text/html, <body> <p>Hello</p> <div> <img src="Maths_AS/Questions/q1.png" style="width: 700px"> </div> <p>Good-bye</p> </body> The text displays, but the img tag just produces a small box with an X.
      When I use the following in a simple html file and display it using a browser (Firefox, Chrome), it displays correctly. In both cases the file references are relative; both the FMP file and the html file are stored in the same directory, from where the image is referenced.
      <html> <head> </head> <body> <p>Hello</p> <div><img src="Maths_AS/Questions/q1.png" style="width: 700px"></div> <p>Good-bye</p> </body> </html> I am using Windows 10 Professional with FMP Advanced v.11.
      I would be most grateful for some help here!
      Thanks in advance
      Bruce
       
    • By Mark Stuller
      During and initial sync of ~5200 records from an 'images' table we received this error:
      Oct 22, 2016 11:39:39 AM com.prosc.mirror.config.server.SyncServer$3 call
      SEVERE: Sync between filemaker8.oda.state.or.us / BeFoodSafe5 (FileMaker Server) and kwiddicombe macOS Desktop BeFoodSafe( username 'developer', running ProAdvanced 15.0.2 on 10.0.1.199, ping time: 215 ms, machine name: 'Developer' )
      Last sync failed: com.prosc.sync.AbortException: Failure while recording changes from FileMaker Server filemaker8.oda.state.or.us/SyncImages: 0
      Ultimately we removed all records in the Images table and added them back to the spoke table 1000 at a time and were able to get them sync'd to the hub table.
      We also routinely received this error but were able to sync again and complete the sync:
      Oct 22, 2016 5:57:08 PM com.prosc.mirror.config.server.SyncServer$3 call
      SEVERE: Sync between filemaker8.oda.state.or.us / BeFoodSafe5 (FileMaker Server) and MSD macOS Desktop BeFoodSafe( username 'developer', running ProAdvanced 15.0.2 on 10.0.1.199, ping time: 65 ms, machine name: 'Developer' )
      Last sync failed: com.prosc.sync.AbortException: java.lang.NullPointerException
      we updated from 3.1007 to 3.11 today, and uninstalled and reinstalled MirrorSync as well to no avail.
    • By Rebecca Bria
      Hi all, thanks for your help in advance. I am sure there is an easy solution. I'm a self-taught beginner/intermediate user. I use Filemaker Pro 12 and sometimes 14 (depending on where I am working, home or university) on a mac.
      PROBLEM: I am using a script to export the full size image (jpg) contents of all records for a particular container field. My problem is that they export as images within text files and I need the original unmodified jpg image. Specifically, they export as filetype "TextEdit Document".
      My script uses "Export Field Contents", where I enter the container field followed by a semicolon and $Images. This sends the images to the desktop** just fine, only they are text docs--that's my problem. Note that the script also uses "Get ( DesktopPath )" to name the file, which includes essential details pulled from other fields in the record, such as the record's unique ID. The full script with Loop commands is visible in the attached screenshot.
      So, how can I get the images to export as the jpgs they are? Thank you!!
       
      **A separate issue if anyone has ideas!: I tried to get them to export to a particular output folder location on my computer, but I always get an error when I do this and try to export, so I stuck with the default $Images which sends them to the Desktop. Manageable but not ideal.

    • By ArchFile
      Hello!
      Disclaimer: I have worked with Filemaker for a few years, but I only have experience constructing simple scripts. 
      In the database I am working with, each of my records has an image container field where I enter .jpg files. I need to export these jpgs. Because there are thousands of records, I don't have time to export them one by one by right-clicking the container and choosing "Export Field Contents".  I need to find a way to batch export the images from this container for all records.
      I found this FM forum that seemed promising: http://help.filemaker.com/app/answers/detail/a_id/5822/~/exporting-the-field-contents-of-a-container-field
      And constructed the script from the instructions:
      Go to Record/Request/Page [First]
      Loop
         Set Variable [$filePath; Value: Get ( DesktopPath ) MyPics::Description & ".jpg"]
         Export Field Contents [MyPics::Picture; “$filePath”]  
             Go to Record/Request/Page [Next; Exit after last]
      End Loop
      This script "works" for me, so I must have done something right, but it only exports the image from the active record. So, either I did something wrong or misunderstood how the script works. I assumed the loop would perform the script for all records from "first" to "last" but it did not.
      Is there anyone out there who perhaps knows what I am doing wrong or knows of a better script I could use to perform this seemingly straightforward operation? I would be very grateful.
×

Important Information

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