I have a feature service with a date query in the map project to show only the points captured in the last 7 days [DATE > DATEADD(day,-7,SYSDATETIME())]. I publish the feature service in AGOL to use in collector in the disconnected mode. When downloading it in Collector I get the error: "The map 'abc' failed to download with the message: Failed to create Replica."
If I go back to the service and remove the definition Query and publish it again through AGOL. I can download the service without any problem. Can anybody assist with this issue.
Just a thought - the definition query may be specific to SQL Server due to the SYSDATETIME() function. This would work when viewing data online but the SYSDATETIME() function may not be available in database that the Collector app uses locally on a device.
Thank you for the quick response. It make sense to me that the sysdatetime function will not be available on the collector. Do you know of a way to get around this problem? I there a query available in ArcGIS that will do the same as the SQL Server Query?
I haven't really worked with collector. If you have control over the data you could run a scheduled process each night that calculates a new AgeInDays (long) field. This way your definition query is against a simple number value.
Seems to be a lot of pain for a simple task but it should work.