Time definition query in Collector and going offline

4509
5
Jump to solution
12-04-2014 09:23 PM
PeterTimmers
Occasional Contributor III

A while back Russ pointed out to me that you can't use time definition queries in your map service if you want the data to go offline.

Is that still true?   I know it's possible in arcgis mobile.

e.g. I want to only show the last 24 hours mapping on Collector.   Our fire air observers need to be able have a relatively clear space for new mapping with fires changing over time.

Or are we better off using scheduled tasks to move data to new tables?

1 Solution

Accepted Solutions
VHolubec
Esri Regular Contributor

Dears,

it looks like the problem with query. AGS for replica creates FGDB. And if the query comes from SDE (MS SQL for example), you can have trouble with this query in replica and map package too. The query for replica cannot be compatibile with FGDB - for exmaple

my queyry is: convert(date,datum,102) = convert(date,GETDATE()-59,102)

It works for SDE, but I cannot create replica, and this query does not work in map package, because this query works only for database and not for FGDB.

As solution it looks the best way create some number column where you will have numbers - number of hours since. And to this column use Definition query - number of hours < 5 (for example). It should work.

Vladimir

View solution in original post

5 Replies
GISSupport3
Regular Contributor

Just tried one of our maps with with time based definition query and got the following:

Error executing tool.: ErrorMsg@SyncGPService:{"code":500,"description":"Failed to create replica."} Failed to execute (Create Feature Service Replica).

Could be due to anything mind you.

See what Russ has to say

VHolubec
Esri Regular Contributor

Dears,

it looks like the problem with query. AGS for replica creates FGDB. And if the query comes from SDE (MS SQL for example), you can have trouble with this query in replica and map package too. The query for replica cannot be compatibile with FGDB - for exmaple

my queyry is: convert(date,datum,102) = convert(date,GETDATE()-59,102)

It works for SDE, but I cannot create replica, and this query does not work in map package, because this query works only for database and not for FGDB.

As solution it looks the best way create some number column where you will have numbers - number of hours since. And to this column use Definition query - number of hours < 5 (for example). It should work.

Vladimir
MarkPeacey2
New Contributor II

Thanks for this, it explains the problem I was having here Non standardized def query breaks Create Replica function . It would be nice if the queries compatible with FGDB could be expanded.

0 Kudos
PeterTimmers
Occasional Contributor III

Pardon my ignorance, but how would I construct a numeric field (like hours since) to only show the last 7 days features?

Could you have a scheduled action in the DB to recalculate all rows every hour... sounds onerous, especially if there is a lot of data.

0 Kudos
GISSupport3
Regular Contributor

Will this be supported in the pending 10.4 release; ie can go offline with time based definition queries.

Thanks

0 Kudos