Home > Contents > Index >
SEARCHSTATE.ADDHASDESCENDANTCONSTRAINT
Adds a descendant constraint into an existing searchstate object.
Syntax
<SEARCHSTATE.ADDHASDESCENDANTCONSTRAINT
NAME="ssname
" ASSETID="id
" ASSETTYPE="assettype
" BUCKET="bucket name
" [IMMEDIATEONLY="true|false
"]/>Parameters
NAME
(required)- Input parameter. Name of an object representing a searchstate.
ASSETID
(required)- Input parameter. Asset id of the descendant asset whose ancestor asset is to be searched.
ASSETTYPE
(required)- Input parameter. Asset type of descendant asset.
BUCKET
(required)- Input parameter. Bucket name. This parameter needs to be unique across searchstates.
IMMEDIATEONLY
(optional)- Input parameter. Boolean value to indicate immediate descendants or all descendants. When the value is
false
, searchstate is set to search for all the descendants. When the value istrue
, (default value) searchstate is set to search for immediate descendants only.
Description
The object referred to by
NAME
is updated to include the new constraint specified by this tag. It adds a search constraint to find assets that have a particular asset of typeASSETTYPE
and idASSETID
as its descendant.Example
This code creates an empty
SEARCHSTATE
and adds a like constraint. Any assets that have 'FSII FSE Triple Play' as their descendant asset will be returned as matches for this constraint. This code then sets thisSEARCHSTATE
into anASSETSET.SETSEARCHEDASSETS
tag to constrain theASSETSET
to be used when searching with other assetset tags. The last tag uses this constrained assetset to search for matching assets and fetch a list of values for a different attribute of the returned assets:<ASSET.LOAD NAME="prod" TYPE="Product_C" FIELD='name' VALUE='FSII FSE Triple Play' /> <ASSET.GET NAME="prod" FIELD="id" OUTPUT="assetid"/> <SEARCHSTATE.CREATE NAME="mainSS" OP="or"/> <SEARCHSTATE.ADDHASDESCENDANTCONSTRAINT NAME="mainSS" ASSETID="Variables.assetid" ASSETTYPE="Product_C" BUCKET="ss2" /> <ASSETSET.SETSEARCHEDASSETS NAME="as" CONSTRAINT="mainSS" ASSETTYPES="Product_P"/> <ASSETSET.GETATTRIBUTEVALUES NAME="as" ATTRIBUTE="FSIICategoryName" LISTVARNAME="resultlist" TYPENAME="Product_A"/> <LOOP LIST="resultlist"> <CSVAR NAME="resultlist.value"/><BR/> </LOOP>See Also
SEARCHSTATE.ADDHASANCESTORCONSTRAINT
SEARCHSTATE.CREATE
ASSETSET.SETSEARCHEDASSETS
ASSETSET.GETATTRIBUTEVALUES
LISTOBJECTS
Home > Contents > Index > ![]()
Oracle XML Tag Reference
Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.