Jump to content

conditional down syncing?


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

Recommended Posts

Hello again!

 

my databases have been operating very well for the past two months!

 

I do have a question now, is it possible to only sync down data that matches a certain criterion? The situation is this, I have 10 stores testing out this database and I want my master server to accept data from all of them but only sync back down their data (in the event that I send them a new file, or they get a new ipad), i've attached a diagram of sorts.

 

I have three ipads at one location that i have setup doing a full sync to a server, and i have the other locations that dont sync at all, but now when i am wanting to update their database, I have no way of getting their data, Is it possible to have different sync settings based on the value in a cell? photo of cell is also attached

 

 

Screen%20Shot%202014-11-03%20at%2012.17.Screen%20Shot%202014-11-03%20at%2012.19.

 

Any help would be greatly appreciated!

Link to comment
Share on other sites

there is a 12th parameter that is passed to the Prepare Payload for Client script from the Pull Payload script, $additional_pull_info. If you modify the script step that sets $dyn_sql to include this in the WHERE clause, then you can "filter" which records are included in the payload.

Link to comment
Share on other sites

Tim-

 

Would changing ES_Exclude to an unstored calc incur a performance hit, though? And, if I wanted to pass a value for use in that calc, what would be the best method? Use $additional_settings in the ES_Exclude calc?

 

 

-Barbara

Link to comment
Share on other sites

Barbara --

 

Yes, using an unstored calc might cause a performance hit. It depends on the number of records, complexity of the calc, etc. But it is the easiest way to filter records.

 

$$additional_pull_info provides a way to send extra info during the pull process, and you can use it for filtering purposes (either in the calc for the ES_Exclude field or in the SELECT statement), or anything else that you want to do with it (logging, etc). However, if the filtering is being done based on account names or prig sets, you can always use functions like Get ( AccountName ) or Get ( AccountPrivilegeSetName ) instead. 

 

So you have a lot of options.

 

-- Tim

Link to comment
Share on other sites

  • 1 month later...

I am also trying to achieve the same thing where I want to filter down records depending on which device id is calling the sync.

I want to use the prepare payload for client script - or  the exclude. 

I am trying to filter records from the hosted file to client file while syncing based on which client device id is syncing. So I am trying to do this in the prepare payload for client script in the Hosted File database.I 

This is where I need to add my business rule, but am not sure how to manipulate the dyn sql variable there to include this business rule. I would like to check if the sync table is a particular table and if a particular client device is doing this sync and if that particular sync table has a field set to some value then that record should be pulled down. Otherwise not. Please advise on how I would achieve this....

Link to comment
Share on other sites

  • 1 year later...
On 11/3/2014 at 0:22 AM, bcooney said:

there is a 12th parameter that is passed to the Prepare Payload for Client script from the Pull Payload script, $additional_pull_info. If you modify the script step that sets $dyn_sql to include this in the WHERE clause, then you can "filter" which records are included in the payload.

bcoony,

Would you please elaborate this a bit more? I have no knowledge of SQL.

Actually what I need is to conditionally sync back from the server to Ipad. I don't want Ipad users to be able to see other users records. I was thinking if I can modify the WHERE clause, somehow, to only push those records with the same "account name" as the Ipad user account name. So this way, when an Ipad user syncs, he/she will only receive his/her records which have been modified on server since last sync.

 

Hope this does make sense at all.

 

Regards,

 

Siroos

Link to comment
Share on other sites

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