9 Replies Latest reply on May 29, 2013 10:17 AM by RafaelCaballe

    Uploading PDF,s to container fields from iPad



      I am trying to use a FMGo solution to store pdf,s into container fields. The intention is that the user only has an iPad and he gets all pdf,s directly there from emails, from internet,...but exclusively from the iOS device. I can't find the way to transfer these files to FMGo in order to be seen by the container field pop-up menu and be uploaded to the field.



        • 1. Re: Uploading PDF,s to container fields from iPad

          Rafael, you're running into one of the limitations of the iPad.  As far as I know there are only 3 locations that you can add a file to a container ( music folder, photo folder, and FileMaker documents folder). Unfortunately there doesn't seem to be a direct way to get a PDF into the FileMaker Documents folder unless you use iTunes or something like Diskaid .  Both of these options require a computer.  You could put the PDF in a container field in a FileMaker file and then email it to the iPads. Then open the file on the iPad and export the field contents of the container field.  This will put the file in the FileMaker documents folder.

          • 2. Re: Uploading PDF,s to container fields from iPad

            rgordon, thanks for your prompt feedback. You get the point perfectly.  I have plenty of pdf,s in GoodReader that I would love send them to FileMaker Documents folder without going back and forth to a computer. From that folder I would place them into container fields. Do you mean that this is an iOS limitation or a FileMaker Go limitation?  Could do either FileMaker or GoodReader, DropBox, PDF expert,...do something to be able to export .pdf files an not just .fmp12 files to The FileMaker Go Documents folder? Or it would be not possible within the limitations of iOS...? Could this feature  added to a FileMaker Go wish list?

            This is a HUGE limitation to use FMGo in many business situations...Thanks!

            • 3. Re: Uploading PDF,s to container fields from iPad

              I believe this is mainly an iOS limitation but if FileMaker could integrate with dropbox or iCloud, this might provide a way to get a PDF file.  This would be at the top of my wishlist.

              • 4. Re: Uploading PDF,s to container fields from iPad

                The insert from URL step does allow you to insert a pdf from a website directly into a container field.

                • 5. Re: Uploading PDF,s to container fields from iPad

                  DropBox app is your friend here :-)


                  Using that and the 'Insert from URL' script step pretty much any type of file can be transferred from email attachments to a container field... Also any file that is available by using a URL can be added using 'Insert from URL' script step as rgordon suggests....


                  For email attachments, choose to 'Open in...' DropBox, and then once uploaded to DropBox, open the DropBox app and open the file.... Even for files that DropBox cannot display, then choose to 'Copy Link to ClipBoard' and open up Safari and paste the link to display the DropBox file download page... Click the 'Download button' and once the file has been downloaded in Safari, then copy the new URL shown in Safari and use that as the URL to use in the 'Insert from URL' script step...


                  It's a bit of a workaround, but works well... I will try and put together a demo file later to post here....



                  • 6. Re: Uploading PDF,s to container fields from iPad

                    Here is a file I've put together that enables any file stored on your DropBox to be inserted into a FMGo container field...


                    So for example, lets say you receive a file called 'thisismyfile.pdf' as an attachment in Mail. In Mail, choose to open the file in DropBox... It will then prompt you to save/upload it to your DropBox..


                    Once that's done, in the list of files on DropBox, tap to view the file and then tap the 'Share' button and choose 'Copy Link to Clipboard'.


                    Next, open up FMGo, and in this case the database I have attached here... I have created scripts etc so that you just need to click the 'Get from DropBox' button and voila the file should end up imported into the container field shown....


                    Note this all only works on iOS with FMGo 12 and the DropBox app installed....


                    I haven't had a lot of time to fully test it and build in error checking, but it looks like it does the job... Take a look at the script and note there is a tiny web viewer and a text field present on the layout just to the right of the container field....


                    Hope this helps,



                    • 7. Re: Uploading PDF,s to container fields from iPad

                      Impressive Sky. It does the job, of course ! I will have a look to your scripts. I only need to make that the export ends to Dropbox and not to FMGo folder...but this is a minor detail. I really thank you for your help.




                      • 8. Re: Uploading PDF,s to container fields from iPad

                        Sky, very very nice.  I was hoping the insert from url would be a key to unlock this dilemma.

                        • 9. Re: Uploading PDF,s to container fields from iPad

                          I have been working with this code:


                          Paste [Select; No style; System::Url]

                          Set Web Viewer [Object Name: "WebViewer"; URL: System::Url]


                                    Pause/Resume Script [Duration (seconds): 2]

                                    Exit Loop If [PatternCount ( GetLayoutObjectAttribute ( "WebViewer" ; "content" ) ; "</html>" ) ≥ 1]

                                    Set Variable [$TimeOut; Value:$TimeOut+2]

                                    If [$TimeOut > 60]

                                              Show Custom Dialog ["Mensaje"; "La página no se puede cargar"]

                                              Exit Script []

                                    End If

                          End Loop

                          Set Variable [$HtmlContent; Value:GetLayoutObjectAttribute ( "WebViewer" ; "content" )]

                          Set Variable [$FileUrl; Value:Right ( $HtmlContent ; Length ( $HtmlContent )-Position ( $HtmlContent ; "<a href=\"https://dl.dropboxusercontent.com" ; 1 ; 1 ) )]

                          Set Variable [$FileUrl; Value:Right ( $FileUrl ; Length ( $FileUrl )-8)]

                          Set Variable [$FileUrl; Value:Left ( $FileUrl ; Position ( $FileUrl ; "&amp" ; 1 ; 1 )-1 )]

                          Insert from URL [Select; No dialog; System::Contenedor; $FileUrl]


                          Essentially is what you proposed, with the addition of the Loop to give time to the web viewer to load the html page before setting the variable. It works well for small files (i.e. pdf,s of just one page), but when inserting multipages pdf,s the whole system crashes, FMP is shut down and Safari gets very slow...Something serious must be happening...! Do you have any idea on what could be the problem...?