Jump to content
Server Maintenance This Week. ×

Custom SQL qualifier checkbox missing


Recommended Posts

I am looking to filter the results coming from a sync.  The Custom SQL qualifier checkbox mentioned in Advanced Help is missing.  I assumed it may have been removed in an update so I attempted to write a WHERE clause in the $$MIRRORSYNC_USERTOKEN but this did not work.  I.e. "WHERE (Project_id='101')" .  Any assistance regarding the checkbox would be appreciated.  BTW I did set up Configuration first and then returned to Edit..

Link to comment
Share on other sites

The document is due for an update; that checkbox now only appears for SQL databases like MySQL, Oracle, and SQL Server.

For FileMaker Server, all customizations should be done in the MirrorSync 6 script. Read the lower section of that script for instructions. It's much easier now, you just write a regular FileMaker scripted find:

Enter Find Mode
Set Field[ Project_id; "101" ]
Constrain Found Set

--Jesse Barnum

Link to comment
Share on other sites

I feel like I am following the instructions, but I am still receiving all records from the Hub.

Since this didn't work directly, I set variables to activate $whichDatabase and $whichAction. I also attempted Go To Layout without any luck,

 

If [ $whichAction = "FindChanges" ]

# ==================================================

#

#         FILTER WHICH RECORDS WILL BE SYNCED

# ==================================================

 

#

#

// Go to Layout [ “Sync_Documents_OFFLINE” (DOCUMENT_TYPE) ; Animation: None ]

If [ Get(LayoutName)="Sync_Documents_OFFLINE" ]

Enter Find Mode [ Pause: Off ]

Set Field [ DOCUMENT_TYPE::Project_ID ; "101" ]

Constrain Found Set []

End If

// Go to Layout [ original layout ; Animation: None ]

 

Link to comment
Share on other sites

Hi Ashley, please run another sync and then go to http://yourserver/MirrorSync -> Send problem report, so that I can see the log file. When you get the automated reply from our ticket system, reply back to that with a PDF of the MirrorSync 6 script so I can see how you've set up your customizations.

--Jesse Barnum

Link to comment
Share on other sites

Posted (edited)

I was able to resolve the issue.  I was placing the 'Find' in the Client version of the script vs. the Server version of the script.  An additional question,

"Any records that are excluded by your search criteria will not be synced to the user. In addition, if those records were previously synced, they will be deleted from the user's device."

I have a multi-tenant database and am filtering synced records by a global variable on the client.  I only want to sync per project at a time, as syncing all projects every time may take a large Amount of time.  Is there a way to prevent this, "if those records were previously synced, they will be deleted from the user's device."?

I should add that I am currently only syncing downward to the client, but would eventually want to sync both ways (but again, only records within the current project the user is in based on a global variable).   While testing, I accidentally deleted a large amount of records on the Hub and am skittish about turning on two way sync again until I am sure of what I am doing.

Edited by Ashley Colburn
Link to comment
Share on other sites

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.