I would like to confirm that I'm not missing something in the API docs. I don't see a way to apply a filter to get components modified after a specified date. I'm using OrganizationalItemItemsFilterData to get components in a specified folder. I want to get only items modified after a specific date. So, I guess I will get all items and then loop through and exclude those that don't meet the criteria. I wanted to confirm I'm not missing this in the API.
Update: trying to use SearchQueryData API and not getting any results with this code (via PowerShell) though it worked fine using GetList (then filtering)
$filter = New-Object Tridion.ContentManager.CoreService.Client.SearchQueryData
#want full objects
$filter.BaseColumns = 3
#want only items of requested type.
$filter.ItemTypes = $ItemTypes
#set folder
$folderLink = New-Object Tridion.ContentManager.CoreService.Client.LinkToIdentifiableObjectData
$folderLink.IdRef = $folder.Id
$filter.SearchIn = $folderLink
#set date
$filter.ModifiedAfter = $ModifiedDate
#recursive?
if ($Recursive)
{
$filter.SearchInSubtree = $true
}
else
{
$filter.SearchInSubtree = $false
}
$client = Get-TridionCoreServiceClient
$client.GetSearchResults($filter)
ModifiedAfter
should setModifiedBefore
to the current date and time, so the filter looks good. ForBaseColumns
, I understand3
(for enum valueExtended
) only applies toListItems
(so maybe not search?). Maybe try2
(forDefault
) ornull
. The docs mention forBaseColumns
, "When null is specified, the condition is not applied."