Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

File references in iOS sync process not correct?

Featured Replies

I'm trying to get a sample offline iOS synch process running and ran into some issues with the file references.  I am following the guidelines set out here (FM TechNet doc): https://community.filemaker.com/docs/DOC-3838

My first problem is with the deployment of the Connector file.  This file is stored in a container field in the 'deployed' file (the one running on the iOS device in offline mode, i.e. NOT hosted).  So this 'deployed' file is running locally, and it contains the 'Connector' file in a container field.  This connector file gets exported and opened.  Once it is opened, it is supposed to have references to BOTH the locally running deployed file and the hosted version of the DB file, in order to move data between them.  But when I open the connector file I am getting 'file not found' errors for the references back to the locally running 'deployed' file.

It appears that my reference to the locally running 'deployed' file is wrong.  What should it be?  The external data source definition is currently a simple: "file:<FileName>" string.  (The connector file is exported to the Documents path, and then opened via an FMP URL similar to this:  "fmp://~/Connector?script=StartSync".)  What is the file path of a file local to the iOS device, that was probably delivered via a email?  (Hmmm...could you deliver these 'deployed' files from a container field in the hosted DB?  They would have to connect using 'open remote' once to get that file.)

 

The 2nd question is that I would like to make a call to the hosted version of this file such that it doesn't open a new window.  The sync process does a simple call to a script in the hosted file in order to verify that the file is available.  But in doing so, the hosted file runs its 'file open' script, which opens a new window and takes the user to a layout.  So on the iOS device, the user would now have two windows showing, which I don't want.  I don't want any UI for the hosted file visible.  (I haven't actually tested this on a device yet.)

 

Thanks,

Justin

 

 

Edited by Justin Close

  • Author

Well, I figured out an answer to part 2 of my posting:  how to test for a server file without opening a window to it.  A PSoS call to it works wonders.  Not sure why I didn't realize that one at first.

 

Maybe I can simplify the question I'm asking in the first part, though:

FileA on an iOS device is open; I want to export a file from FileA, called FileB (another FMP file).  I then need to open FileB from FileA.  AND, FileB needs to have 'external data source' references back to FileA, because there are T.O.s in FileB for FileA.  What would the file reference in FileB need to look like to reference FileA (that is already open)?

Would it matter how FileA were deployed to the iOS device (e.g. iTunes sync vs. email attachment)?  Does FileB have to be put into /Temp vs /Documents?  (The whitepaper uses 'get(documentspath)' to export  FileB.)

 

Hi Justin,

It's not clear to me if you've created your own sync solution or you have integrated one of the pre-built solutions (360MirrorSync, GoZync, EasySync). EasySync includes an updater technique "EasyDeploy." If you download the sample files, you can see how the upgrade is scripted and learn from the External Data Sources setup.

Another updater solutions available is from Colibri: http://www.colibrisolutions.com/2014/03/24/one-click-version-updates-for-filemaker-go-13/

hth

Barbara

  • Author

Thanks for the links, Barbara.  I will see if I can glean the answer from them.

I was rolling my own, using the whitepaper document put up by FileMaker, authored by Katherine Russel of Nightwing Enterprises, as a template.  She describes the script steps for doing the export and reference, but it wasn't working for me for some reason.

Justin, don't reinvent the wheel. Unless there is a clear reason to roll your own, use one of the existing products. Imports are not transactional. 

  • Author

Well, I went through the process again...and this time it seems to have worked.  Not sure what my issues were the first time around.

So if you send a file to the iPad via email and save it to the device for opening in FMGo, that document ends up in the .../Documents directory.  This is the same directory path as returned by 'get(documentspath)'.  So if you export a file contained in a FMG file, and use this Documents directory, it will reside right next to other local files.  This means that those newly exported files can have external data source references to existing files by the simple reference "file:<filename>".

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.