Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Pulling records from server to all devices


Ddoughtie

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

Recommended Posts

I've had pretty good success using FMEasySync with pushing. I've got multiple users in the field pushing in records everyday. No problem. The issue I have is that there are some inspection records that everyone needs to get back to their Mobile. Each user is doing a monthly inspection. They need to have the record from the previous inspection to calculate how many "cycles" have occurred since the last inspection. It's never the same person going back. The issue I have had is that when Pushing from the server not everyone gets the necessary records. It seems like only those to created the original records get them back.  Or one user will get the record and anyone after that does not.

To get around that I push the new records from mobile to server using fmeasysync then after a successful sync toss away everything on the mobile device, then I do a regular import of all the records. (prior to the import I set a flag on the server for one field called "no_transfer" to 1. That field in the mobile solution is set to auto enter 0 when a record is created. I set the ES_EXCLUDE to be a calc field on the mobile side that says if "no_transfer" = 1 then exclude. [I could have left the ES_EXCLUDE as a regular field and used a script to set it to 1 after import but I also had it look for a "delete" flag to keep it from syncing a file that was marked "Delete" but we didn't really want it to get deleted from the ipad].  All new records have 0 in the No_transfer flag so the new stuff comes across. That prevents unnecessary roundtripping since no one can edit an old record anyway.)

But as the records build up this secondary import process makes syncing longer. I would love to simply pull the last known inspection for that location (there's 30 of them). But everyone needs to get those 30 records, not just the last device to have that record or the first user to touch the record. How can I use the Pull side to grab the records for every user? I can easily script it to set the ES_EXCLUDE field to only allow those 30 files  through, but what do I do to force them for every user? Do I reset one of the other ES_xxx fields to allow this.

I've done some experimenting with trying to do a find before import but the 'found set" state of a server doesn't seem to act like a standalone file where the Found Set of a table will determine what comes in. I know I could do this with a middle man file but I would prefer sticking with fmeassync.

Link to comment
Share on other sites

Hi, have you actually determined WHY the records are not being pulled? If not here's a possibility:

There is a small but crucial logic flaw in the original FM Easysync. If you haven't seen this thread, check it out, implement tmr_slh's solution, and see if that fixes your problem without the need for the client to re-download all the records after every successful push.

 

I had a similar problem pulling records consistently in a multi-user system and this solved it for me.

-Josh

 

Link to comment
Share on other sites

Thanks. I'm noodling over it and think it will work. I think combining it with a script that will flag the exclude files will solve my problem. Basically I need 30 files out of 1500 and with the exclude flag set on 1470 of them and and resetting the other flags then I might have my solution. Shame Tim took down all the troubleshooting documents. Luckily I printed out the install docs. Wish I had printed the troubleshooting stuff. Thanks.

Link to comment
Share on other sites

Right on, sounds like a good plan. You can also set Es_Exclude to an unstored calc so you needn't visit every record and set its exclude flag in a script, though I'll concede the script method gives more ad hoc control.

Another option is to utilize the $$additional_*_Info variables. You can set them in your sync scripts, pass the info to server, and use it there to modify your SQL statements.

Anyway, godspeed.

J

Link to comment
Share on other sites

This topic is 3181 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.