8 Replies Latest reply on Oct 31, 2014 5:48 AM by TSGal

    Pro Advanced and CSV file refresh from GO/Ipad

    MattW_1

      Title

      Pro Advanced and CSV file refresh from GO/Ipad

      Post

      I’m running filemaker pro advanced and I’m trying to come up with a way from Filemaker GO/ipad to refresh an open files CSV file at least once a day.

      I’ve tried a few things on the ipad including an OnTimer which triggers a script but it just blanks out the CSV file in filemaker pro without importing.

      Is their any trigger I can execute on the IPAD that will trigger Pro desktop to refresh a CSV file?

        • 1. Re: Pro Advanced and CSV file refresh from GO/Ipad
          AppGuy

          Why don't you just run the OnTimer script on the desktop version...  The the desktop will do the importing then..

           

          • 2. Re: Pro Advanced and CSV file refresh from GO/Ipad
            MattW_1

            I thought about putting a timer on the desktop version, the issue is no one ever uses the desktop interface. We're almost exclusively using filemaker go. So I'm not sure how I would trigger the desktop version to refresh the csv file unless I run an applescript, but the problem their is that if I have two filemaker databases open at the same time it could get a little tricky running an applescript each day.

            • 3. Re: Pro Advanced and CSV file refresh from GO/Ipad
              schamblee

              You would have a timer on the desktop.  Your timer script with run and check for a flag then it would preform another script or same script with an if block, which the flag will be set from the client device, then the timer script would reset the flag to false after the script had ran.   This being said, I assume you are hosting the database on file maker pro and you are connect from file maker go.  The timer will start as the database is open and will run until you stop it or close the database.

              • 4. Re: Pro Advanced and CSV file refresh from GO/Ipad
                MattW_1

                Ok thanks that seems to work.. Here's a strange issue that's come up though. If the ipad is restarted or if I quit out of filemaker GO and come back into the file it immediately starts  a progress bar with "records remaining to be deleted" and it automatically deletes all the records from the filemaker file.

                I've turned off all the scripts and I still can't figure out why filemaker GO is clearing "all" the records everytime the file is loaded automatically. Any ideas?

                • 5. Re: Pro Advanced and CSV file refresh from GO/Ipad
                  TSGal

                  Matt W:

                  Thank you for your post.

                  Open the file in FileMaker Pro, pull down the File menu and select "File Options...".  In the File Options window, click the "Script Triggers" tab, and see if there is a checkmark next to OnFirstWindowOpen.  If so, uncheck it so a script will not run on subsequent openings of the file.

                  If there are no OnFirstWindowOpen or OnWindowOpen scripts active, then go to Layout mode, pull down the Layouts menu and select "Layout Setup...".  In the Layout Setup window, click the "Script Triggers" tab, and see if there is a checkmark next to OnLayoutEnter or OnRecordLoad.  If so, uncheck those checkboxes so a script will not run when entering the layout or when a record loads.

                  TSGal
                  FileMaker, Inc.

                  • 6. Re: Pro Advanced and CSV file refresh from GO/Ipad
                    schamblee

                    I don't know enough about your database to give you answer.  It sound like there is a script trigger that is running a script that delete files.

                    • 7. Re: Pro Advanced and CSV file refresh from GO/Ipad
                      MattW_1

                      Thanks TSGal and S Chamblee.. Your right their is a script trigger "OnFirstWindowOpen" that I'm running on the desktop so that I can have a timer that pulls in a CSV file at a specific interval. What I didn't realize is the ipad will also attempt to run that same script trigger which is what's causing the issue of records deleting.

                      It looks like I can't designate a script for desktop only at least in the case of first window open?  The only work around I found was not allow the ipad access to the "OnFirstWindowOpen" script. It does produce a access popup but I guess that will work. Is that what you'd suggest as a work around?

                      Thanks!

                      • 8. Re: Pro Advanced and CSV file refresh from GO/Ipad
                        TSGal

                        Matt W:

                        Find the script that is called by the OnFirstWindowOpen script trigger.  Go into Manage Scripts and edit that particular script.  If you don't want the iPad (or any iOS device to run that script trigger), then insert the following three lines to the front of the script:

                        If [ Get ( Device ) > 2 ]
                           Exit Script []
                        End If

                        -----

                        Get (Device) function returns 1 for Mac, 2 for Windows, 3 for iPad and 4 for iPhone/iPod touch.  Therefore, if Get (Device) returns a value greater than 2 (iPad/iPhone/iPod touch), then the script is exited.  Does that make sense?

                        If you need the first part of the script to run before the deletion of records, then insert the above three script steps in the appropriate place.

                        Let me know if you need additional clarification.

                        TSGal
                        FileMaker, Inc.