Home > Contents > Index >
ASSET.SEARCH
Locates a list of asset primary table rows based on the asset type and a set of search criteria.
Syntax
<ASSET.SEARCH TYPE="asset type" [SUBTYPE="asset subtype"] PREFIX="prefix" [FIELDLIST="field name(s)"] [EXCLUDE="true|false"] [WHAT="*|fieldsToReturn"] [LIMIT="maximum assets"] [ORDER="order-by string"] LIST="list variable name" />Parameters
TYPE (required)
- Asset type of assets for which to search.
SUBTYPE (optional)
- Asset subtype. For flex assets, this must be specified if asset attributes are part of the search criteria.
PREFIX (required)
- Prefix for variable names used to specify search criteria .
FIELDLIST (optional)
- A comma-separated list of field names that may have search criteria specified. If this argument is not specified, then all local fields are considered. The following key words represent groups of attributes: "LocalFields" - fields of the asset's primary table "Publist" - publication ids.
EXCLUDE (optional)
- When set to
true
, it specifies to scatter all fields except those specified by the FIELDLIST parameter.
WHAT (optional)
- Comma separated list of fields from the asset's primary table to return. '*' indicates return all fields.
LIMIT (optional)
- Maximum number of assets to return.
ORDER (optional)
- An Order-By string to add to the end of the query. You can only use fields in the asset type's primary table for the order-by string.
LIST (required)
- Name of resulting list.
Description
The search criteria are gathered from Sites variables. For attributes of simple types, the variable search criteria is gathered from the following:
prefix:attribute
_op
- Search operation. Valid values are=, !=, <, >, <=, >=, like,
ornot like
.
prefix:attribute
_map
- For case-insensitive search of string fields. Indicates whether to map everything to upper or lower case before performing the operation. - Valid values arenone, upper,
orlower
.
prefix:attribute:
Total
- Number of criteria for this attribute to string together withOR
s.
prefix:attribute:
n - Where n is a number between 0 andprefix:attribute
Total
-1 , indicating the search value.If there is no
prefix:attribute:
Total
variable:
prefix:attribute
- search valueError Numbers
The possible values of
errno
include:
Value Description -105 Database error. -10001 The implementing class is invalid. -10002 There is a missing method for the implementing class. -10003 The method could not be invoked successfully. -10001 The implementing class is invalid. -12006 There is no such asset type. -12064 Invalid asset search criteria.Example
This example shows a search for non-voided Articles in a certain publication with a name containing World or General.
<SETVAR NAME="searchfor:status_op" VALUE="!="/> <SETVAR NAME="searchfor:status" VALUE="VO"/> <SETVAR NAME="searchfor:name_op" VALUE="like"/> <SETVAR NAME="searchfor:name:Total" VALUE="2"/> <SETVAR NAME="searchfor:name:0" VALUE="General"/> <SETVAR NAME="searchfor:name:1" VALUE="World"/> <SETVAR NAME="searchfor:Publist_op" VALUE="="/> <SETVAR NAME="searchfor:Publist:Total" VALUE="1"/> <SETVAR NAME="searchfor:Publist:0" VALUE="968251170475"/> <ASSET.SEARCH TYPE="Article" PREFIX="searchfor" LIST="mylist" FIELDLIST="Publist,LocalFields"/> <CSVAR NAME="mylist.#numRows"/> assets returned<br/> <LOOP LIST="mylist"> <CSVAR NAME="mylist.name"/>, <CSVAR NAME="mylist.description"/><br/> </LOOP>This example shows a search for flex asset Products with definition, PTypeFund, where the symbol attribute is either 'PMDEX' or 'PMDIX', regardless of case. The id and name columns will be returned in the list.
<SETVAR NAME="prd:Attribute_Symbol:Total" VALUE="2"/> <SETVAR NAME="prd:Attribue_Symbol:0_op" VALUE="="/> <SETVAR NAME="prd:Attribue_Symbol:0_map" VALUE="upper"/> <SETVAR NAME="prd:Attribute_Symbol:0" VALUE="PMDEX"/> <SETVAR NAME="prd:Attribue_Symbol:1_op" VALUE="="/> <SETVAR NAME="prd:Attribue_Symbol:1_map" VALUE="upper"/> <SETVAR NAME="prd:Attribute_Symbol:1" VALUE="PMDIX"/> <ASSET.SEARCH TYPE="Products" PREFIX="prd" SUBTYPE="PTypeFund" LIST="prdlist" WHAT="id,name" FIELDLIST="Attribute_Symbol"/> <CSVAR NAME="prdlist.#numRows"/> assets returned<br/> <LOOP LIST="prdlist"> <CSVAR NAME="mylist.name"/><br/> </LOOP>
Home > Contents > Index > ![]()
Oracle XML Tag Reference
Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.