Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

how can I capture the "added to" date field value?

Posted on 2003-10-29
11
235 Views
Last Modified: 2013-12-18
We had an old replica of a database replicate with a newer replica.  Because 200+ of the deletion stubs had expired, several previously-deleted docs were reintroduced.

If I look at the properties tab of an individual document, I can see the "added" date, which is this morning.  I need to find all of the docs "added" this morning so I can delete them again.

How do I do this?
0
Comment
Question by:SandraE
  • 3
  • 2
  • 2
  • +1
11 Comments
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 250 total points
ID: 9646510
In the source replication expiry settings, change 90 days to 0 and then replicate and see if that wil fix the problem

~Hemanth
0
 
LVL 1

Author Comment

by:SandraE
ID: 9646752
I don't see "expiry" settings.  What do you mean here?
0
 
LVL 31

Assisted Solution

by:qwaletee
qwaletee earned 250 total points
ID: 9648223
Hemantha is refering to the replication settings value "purge documents older than X days"  Probably a bad idea -- if you have 91 days old documents that you want to keep (i.e., ligitimate documents) would also be purged.  And you would need to do this on every affected replica!

Better idea: Make use a of a Note sbug that I dearly hope they never fix.

There are four dates associated with a document:
1) Universal created
2) Local created
3) Universal updated
4) Local updated

Thes foru are listed in teh same order on document properties. "Universal" refers to the time associated with the replica the document was created/updated in.  Local refers to the time the document replicated in -- or, will be teh same as universal time if the saev occured in that replica.

@Created returns #1.  @Modfied returns #3.  NotesDocument.LastModified is SUPPOSED TO return #3, but actually returns #4.  So, you can use NotesDocument.LastModified to determine which documents were updated in a particular replica at a particular time.

In your case, #s 2 and 4 would match for a "resurrected" document, because at the time of replication, the document was locally cerated it did not exists because the original document becasme a stub which was then purged, so effectively, the local replica did not "know" this document, and had no match to replicate, and instead added this seemingly new document).  Theerfore, for local purposes, add matches update. #1 and #3 would be the "real" dates for the document, since those are the universal times recorded in the source (old replica).

A little script like his might do the trick:

Dim s as new notesSession
Dim db as notesDatabase
Set db = s.currentDatabase
Dim docs as notesDocumentCOllection
Set docs = db.allDocuments
Dim doc as notesDocument, nextDoc as notesDocument
Set doc = docs.getFirstDocument
const replStart = ... 'timedate
const replEnd = ... 'timedate
Do Until Doc Is Nothing
    Set nextDoc = docs.getNextDocument(doc) 'record it now in case it is deleted during the loop
    If (doc.lastModified>=replStart) and (doc.lastModified<=replEnd) Then
      doc.remove
    End If
    Set doc = nextDoc
Loop
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Expert Comment

by:navgup
ID: 9772517
You can do it thru API, if you need the exact code i can send it to you, send me your email address. But how much should i get from it ??

0
 

Expert Comment

by:navgup
ID: 9772524
The code i have reads the Added date time for every document. You can do what ever you like from it.
0
 
LVL 1

Author Comment

by:SandraE
ID: 9772650
what is your email address?   it's not in your member profile
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9773043
I'm disapointed.  I gave you a script that would easily identify the documents, but you want to go through the API?!
0
 

Expert Comment

by:navgup
ID: 9773888
send a note to : mngupta@hotmail.com
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question