January 4, 20242 yr 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..
January 4, 20242 yr 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
January 4, 20242 yr Author 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 ]
January 5, 20242 yr 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
January 6, 20242 yr Author 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 January 6, 20242 yr by Ashley Colburn
January 9, 20241 yr Author Will MirrorSync keep the iPad/FMGo from going to sleep during a long sync?
Create an account or sign in to comment