13 Replies Latest reply on Mar 11, 2017 4:05 AM by olgerdiekstra

    Filemaker Go auto insert into container field

    tylerbaker

      Filemaker Go 15

      Filemaker Server 15

      iPad Air 2

       

      I have created a custom camera app for iPad.  Using x-callback-url the camera app is called from Filemaker Go.  Once the photo has been captured and manipulated it saves to Photos on the iPad and the complete path and file name is passed back to Filemaker.

       

      The plan was to use Insert File with the returned results, but it doesn't look like that step isn't supported with a specified file name.  Whenever I test it I always end up with a popup showing files on the iPad to select from.  Same with Insert Image.  Insert from Device does not allow me to specify the file to use in the script.  It only allows the user to pick.

       

      Does anyone know a (creative) way to get a photo from iPad's Photos into a container field via a script?

       

      If not, since this is a custom camera I can add anything to it I need.  Could someone suggest a way to get a file off the iPad to the specific container field on the server side database? i.e. Can you send a file to a specific container field of a specific record, in a specific database using webdirect all in one URL?

       

      This is the least elegant solution I can think of, but maybe the camera app uploads the file to a web server and then use the Insert from URL script step to download the image into the container field...

       

      Any suggestions?

      Thanks

        • 1. Re: Filemaker Go auto insert into container field
          bigtom

          Did you try insert picture?

           

          I think this should work if the image is saved as a file to the device and not in Photos.

           

          The only idea that that comes to mind is using a web viewer with image data or passing the image off to Dropbox or iCloud Drive. Copy/paste?

          • 2. Re: Filemaker Go auto insert into container field
            skywillmott

            As you have the file path,, would 'Insert from URL...' work I wonder..? Sounds interesting that you have the full file path to an image stored in Photos...

            • 3. Re: Filemaker Go auto insert into container field
              odubov

              If you already have created a custom app, I suspect, that you could use FileMaker iOS SDK app instead of FileMaker Go.

              Then you'll be able to save your photo to shared  folder.  Two apps from one developer can share Group container and have direct access to files.

              Enabling App Sandbox

              • 4. Re: Filemaker Go auto insert into container field
                rgordon

                FileMaker Go can only insert files via a script from  the document folder and temp folder. If you can   copy the photo you could use the paste command to place the photo into the container field.

                • 5. Re: Filemaker Go auto insert into container field
                  tylerbaker

                  Thanks for the help and ideas.  As a point of reference, here is the returned path.

                  file:///var/mobile/Media/DCIM/101APPLE/IMG_1244.JPG

                  I did try file:/// and file:// but I did not change anything else about the path, so maybe if someone sees something in the structure of the path that is preventing the insert...  I'm a PC guy, so Mac paths a foregin to me.

                   

                  Skywillmot, I did try Insert from URL after posting here.  It gave me an error about the connection.

                   

                  bigtom, yes I tried Insert Picture, though it was saved in Photos and not as a file somewhere else.  I setup a web server and had the camera app upload the image to the web, then had Filemaker Insert from URL the image, but the wait time to do all that was unacceptable.  As I need to take 20 photos at a time, I can't afford the time routing the photos through the internet adds.  Not to mention tripling data usage.

                   

                  odubov, thanks for the SDK recommendation. I had never heard of it.  I will look into this for a lot of things our company has going on.

                   

                  rgordond, I did not know I could paste into a container field.  Copy paste would likely work. I wonder if it maintains the EXIF info?  Good to know about inserting from the temp folder.  Perhaps I will look into saving to the temp folder as well and passing that path to see if I can successfully insert the file that way.  I like that way better than copy/paste.

                  • 6. Re: Filemaker Go auto insert into container field
                    tylerbaker

                    As an update, copy/paste looses the EXIF data, which is required.  So that method is out.

                    • 7. Re: Filemaker Go auto insert into container field
                      CarstenLevin

                      I accept and respect that you do not want to use the build in photo function with the "insert from device" script step. But just to get a clearer understanding, why is it that you do not use this?

                      Is it the ability to adjust/manipulate the photo in "photo"?

                      • 8. Re: Filemaker Go auto insert into container field
                        tylerbaker

                        I would love to use the built in camera with Insert from device,but yes, the photo requires gps, date and label stamped on it.

                        • 9. Re: Filemaker Go auto insert into container field
                          CarstenLevin

                          Hi Tyler,

                           

                          Does it need to be stamped on from the external source ... we are doing watermarking, timestamping etc. via robot functions on the server ... thereby simplifying the process the fieldworker with the iPad.

                           

                          Best regards

                           

                          Carsten

                          • 10. Re: Filemaker Go auto insert into container field
                            tylerbaker

                            Carsten,

                            It could be performed server side.  So long as the EXIF data remained intact.  I tried GoDraw 2 to accomplish the stamping after the photo was taken but the saved file did not have the EXIF data.

                             

                            I hadn't thought about the phrase "watermarking" when looking for a solution.  Using that in my Google search returned Watermark by Todd Geist and ScriptMaster by 360Works for watermarking.  I will have a look at those to see what I can accomplish with them.

                             

                            You said " ... we are doing watermarking, timestamping etc. via robot functions on the server ..."

                             

                            What is your technique for accomplishing this?

                            • 11. Re: Filemaker Go auto insert into container field
                              philmodjunk

                              You do know that getContainerAttribute can be used to access a photo's meta data? Shouldn't that be possible via Insert From Device?

                              • 12. Re: Filemaker Go auto insert into container field
                                tylerbaker

                                Yes, I know I can get the attributes. But how do I go about actually

                                watermarking the image with it?

                                • 13. Re: Filemaker Go auto insert into container field
                                  olgerdiekstra

                                  Not sure if this is still relevant. One of our clients required GPS coords with their photos taken on iPad's as well. After some testing we found that photo's taken with the "insert from device" would not have GPS coords. If the same photo was taken with the camera app (outside of FM), coords would be inserted fine.

                                  Some testing revealed that the camera app itself doesn't insert the GPS coords, rather iOS does when the camera app tells it to. This works fine for photo's stored in the iOS photo app, as the OS continues having access to them. The way we tested this is by taking photo's inside, check GPS coords in those photo's and then walk outside. Camera app was closed by then but the GPS coords still magically appeared in the photos that previously had none.

                                  However, when a photo is taken with "Insert from device", the photo goes straight into a container and is no longer accessible to the OS to add GPS coords. Unless coords are present at the time of taking the photo, they won't be inserted.

                                  The way we get around it is by waiting 30secs or so in the script to grab GPS coords with FM, and then add those in separate fields. If the photo needs to be exported, the GPS coordinates are added to the JPG using ExifTool (www.sno.phy.queensu.ca/~phil/exiftool/).

                                  We store the exiftool binary in a container field and drop it in a folder of the user when needed. Works quite well and is free.

                                  This can only be done on a desktop of course (Mac or Win).

                                   

                                  If you want to watermark images, you could use something like ImageMagick (learning curve though!). Very powerful and also open source. Commandline driven so completely scriptable.