Absent Member.
Absent Member.
1051 views

Retieve all updated records since xxx date

Jump to solution

What would the search clause be to retrieve all updated records since X date?

And would this include new records?

 

How about deleted records, is there a way to find all deleted records since X date?

 

Cheers

John

0 Likes
1 Solution

Accepted Solutions
Highlighted
Honored Contributor.
Honored Contributor.

Re: Retrieve all updated records since xxx date

Jump to solution

Hello hello_world,

 

The search string format is something like: "updated >= 1-10-2010"

 

Yeah, using the search string when you can is so much easier than working with / trying to figure out the search clauses :smileyhappy:

 

In the TRIM client Help there's some good info on using the Search String syntax and an appendix (Appendix B) with all the available search terms you can use.

View solution in original post

0 Likes
3 Replies
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Retieve all updated records since xxx date

Jump to solution

Last Updated is pretty much any change to the record.  Date Modified is only when the electronic document was last edited.

 

So criteria is Last Updated = 19/05/2011 to 20/05/2011 then filter for all record types.  This is a very broad search you would need to build on it depending on your needs.

 

When you say 'deleted', do you mean deleted permanently off the system??  If so you are better off pulling the audit log for the day off the server and sorting events in Excel.  Depending of course on what events you write to the log. 

 

(Then once you've sorted it out consider restricting 'delete' permissions...)  :smileyhappy: 

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Retrieve all updated records since xxx date

Jump to solution

Here is my code at the moment:

using (var records = new TrimMainObjectSearch(db, BaseObjectTypes.Record))
{
  records.SetSearchString(@"acl:""View Document"",[""Administration""] and extension:*");

  TrimSearchClause updateSearchClause = new TrimSearchClause(BaseObjectTypes.Record, db, SearchClauseIds.Updated);
  updateSearchClause.SetCriteriaFromDateComparison(ComparisonType.GreaterThanOrEqualTo, new TrimDateTime(lastUpdated));
  records.AddSearchClause(updateSearchClause);

  records.SetFilterString("type:document");
  records.SetSortString("updatedOn");

  foreach (Record resultRecord in records)
  {
  }
}

 

I would really like not to have to do:

TrimSearchClause updateSearchClause = new TrimSearchClause(BaseObjectTypes.Record, db, SearchClauseIds.Updated); updateSearchClause.SetCriteriaFromDateComparison(ComparisonType.GreaterThanOrEqualTo, new TrimDateTime(lastUpdated));
records.AddSearchClause(updateSearchClause);

 

And do it all on the records.SetSearchString.

But I haven't figure out what is the correct way to represent updateSearchClause as a string search criteria.

Does anyone know how to do this as a string search criteria?

 

0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

Re: Retrieve all updated records since xxx date

Jump to solution

Hello hello_world,

 

The search string format is something like: "updated >= 1-10-2010"

 

Yeah, using the search string when you can is so much easier than working with / trying to figure out the search clauses :smileyhappy:

 

In the TRIM client Help there's some good info on using the Search String syntax and an appendix (Appendix B) with all the available search terms you can use.

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.