Available for: Content Management Server, Template Engine
Task: Searches for all IDs of files that meet the specified search criteria. Only files for which the user has read permission are output.
Additional information: The command does not return implicit mirror files (created automatically by the system).
Syntax:
obj where {parameter value}
Function parameters:
-
parameterspecifies the search criteria or restricts the search result list in another way. The following parameters are available.idsis a list of file IDs. If this parameter is specified, only the files with the IDs in the list are searched, otherwise all files.maxResultsspecifies the maximum number of hits to be returned. The value 0 (default) deactivates this limitation. See also themaxSearchResultSizesystem configuration entry. The value of this entry has priority over the value ofmaxResults.condition:valueis a condition a file must meet to be included in the search result list.valueis a list composed of three elements, a property, a comparison operator, and a value with which the property is to be compared. The following table contains all possible combinations of these three items:Property Operator Comparison value name
title
nameOrTitle
objClassis
contains
startsWithString objTypeis
isOneOfdocument
publication
generic
image
template
List of file types (seeis)stateis
isNot
isOneOfedited
committed
released
List of workflow states (seeis)objectis
has
hasNoinactive (from version 6.5.0)
mirror (from version 6.5.0)
superLinks
superLinksSeveral conditions can be specified, which are then combined with and. Example:
obj where condition {name contains foo} \ condition {objType isOneOf {document publication}}If an empty list is specified for
objType isOneOforstate isOneOf, the results list is empty.state isNotis the only negation available. It is required because workflow states are not exclusive (a file can have an edited or a committed version plus, optionally, a released version.object is inactivereturns all objects without any or without a temporally valid version.The
obj whereconditions can also be used in the Template Engine. However, since only released files exist in the Template Engine,statereturns the following:state is/isOneOf...released:the condition is ignoredcommitted/edited: the results list is always empty
state isNot...released: the results list is always emptycommitted/edited: the condition is ignored
The
objectproperty is not available in the Template Engine.
valuecontains the value for the corresponding parameter.
Return value if successful: the list of IDs of the matching files (stringlist)
Necessary permissions (CM only): no restrictions
Examples:
CM>obj where condition {state isOneOf {edited committed}}
CM>obj where ids {2001 3002} condition {name contains foo}
CM>obj where condition {name is bar} condition {title contains foo}
CM>obj where condition {name is foo} maxResults 20