5 Replies Latest reply on Apr 16, 2014 3:43 PM by rgordon

    Import and Export

    forester

      I have two questions:

       

      1. I have a solution that has a button to generates a .csv file and attaches it to an eamil which is what I want the user to be able to do. However, I don’t want the user to have the ability to go into the FileMaker Go menu and send/save the FileMaker database. If I go into privileges and turn off the ability to export then it appears that my button with the export script is being blocked due to the change in privilege. Is there a way to make the script override the privilege restriction?


      2. When the button with the export .csv to email is run it creates a .csv file on the iOS device. I would like to have a button in the solution that imports that data from the .csv file into a new installed empty database. I can’t seem to make that work. Is importing on an iOS device possible? Any suggestions?

      Thanks-you!

        • 1. Re: Import and Export
          taylorsharpe

          1)  You can remove the export privilege for them, as well a privilege to edit scripts.  Then you can change the script to run in Full Access mode (check box at bottom left of script) that does the export.  That way they can run the script which runs in full access mode, but they still can't do exports.  Alternatively you could include the CSV formatted data in the body of the email. 

           

          2) Yes, but you have to comply with Apple's sandboxing of files.  You cannot import unless it is in the FileMaker Go files area.  How are you getting the CSV file onto FileMaker Go? If you export to the Documents path or Temporary path and use the same path to import, you should be good to go. 

          • 2. Re: Import and Export
            forester

            Thanks for replying.

            Sounds like your answer to number 1 will do the trick.

             

            for #2 the the CSV file is generated by the export to email script which puts the CSV in the email to send to someone but also saves a copy in the FileMaker app i.e. in the FileMaker Go files area. The idea being you could delete my FileMaker solution, load in a new empty copy of that same solution and then use this button to load the data back into this newly installed version.

            I know it sounds like a weird scenario but essentially thats what I want to be able to do.

             

            Based on what you said it sounds possible but I must be missing something simple. Maybe its in my import script that I'm not pointing to the file correctly.

             

            Thanks again.

            • 3. Re: Import and Export
              forester

              Thank you.

              Got problem one working.

              Still not sure about problem two. Any additional thoughts? Do you know what I should have in the "Specify File" box? It asks for a File Path Format. I'm not exactly sure what to put here. It seems like it is asking for a directory path on a computer or server path but I want it to import the CSV file that is sitting in the FileMaker Go files area.

              Thanks

              • 4. Re: Import and Export
                mark.stuller

                FileMaker Go can only import from a .fmp12 file, not csv

                • 5. Re: Import and Export
                  rgordon

                  As mark stated you can not import from a csv file.  You can view the csv in a webviewer which then will allow you to scrap the data using getlayoutobjectattribute.  Then you can parse the data from the html and build the records from the data.  This process is a little involved to do but it works.