Jump to content
Server Maintenance This Week. ×

File references in iOS sync process not correct?


This topic is 3180 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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
Link to comment
Share on other sites

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.)

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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>".

Link to comment
Share on other sites

This topic is 3180 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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