Replication Formula that contains @Today?

I have a local replica on a client that I want to keep small. I have decided to want only documents that were created in the last two weeks. The server will contain all documents. So in the local replica’s replication settings, the replication selection formula is:

dt:=@Adjust(@Today;0;0;-14;0;0;0);

SELECT @IsAvailable(“DateField”) & DateField > dt

=================

NOTE: the DateField field is actually a datetime field that is calculated when composed, and is similar to @Created, but there are real circumstances to cause me to use a field and not just rely on @Created

=================

As soon as I introduce this formula, and allow a scheduled replication session to occur, the subset of documents on the client looks great…just two weeks’ worth.

HOWEVER, after checking in on it after a few days, I see that the earliest docs that I saw initially after adding the replication formula are still there. So after 10 days, I now see 24 days’ worth of documents there.

I see in the Documentation that it says you cannot use @Now in a replicatin formula, but it doesn’t say you cannot use @Today. Even though they are both datetime values, there is a difference (e.g. @Now calculates to the one-hundredth of a second).

Does my scenario make sense? Anyone know the inner workings of the replication logic or engine that can explain why I am experiencing this?

Thanks.

Matt

Subject: Archiving

Use the archive feature to remove the old documents from the local db. You don’t have to actually archive anything; you can just have the archive process delete the documents.

Subject: RE: Archiving

I am trying to not introduce actual deletion stubs anywhere. It is absolutely imperitive that I have all documents on the server, and have no chance of anything getting deleted there.

I will look at archiving as a possible solution.

Thanks.

  • Matt

Subject: Replication Formula that contains @Today?

Hi,

why don’t you just use the “Remove documents not modified in the last … days” under Space Savers in the Replication Settings?

@Now and @Today work the same way and you definitely should use those two functions in replication or view selection formulas.

Best regards
Mario Varchmin
http://www.e-llennium.de/e-llennium/index_en.htm