Home > Contents > Index >
SEARCHSTATE.ADDHASANCESTORCONSTRAINT
Adds an ancestor constraint into an existing searchstate object.
Syntax
<SEARCHSTATE.ADDHASANCESTORCONSTRAINT
NAME="ssname
" ASSETID="asset id
" ASSETTYPE="asset type
" 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 ancestors or all ancestors. When the value is
false
, searchstate is set to search for all the ancestors. When the value istrue
(default value), searchstate is set to search for immediate ancestors 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 ancestor.Example
This code creates an empty
searchstate
and adds an ancestor constraint. Any assets that have 'FSII Superior Systems Inc.' as their ancestor 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.<ASSET.LOAD NAME="prod" TYPE="Product_P" FIELD='name' VALUE='FSII Superior Systems Inc.' /> <ASSET.GET NAME="prod" FIELD="id" OUTPUT="assetid"/> <SEARCHSTATE.CREATE NAME="mainSS" OP="or"/> <SEARCHSTATE.ADDHASANCESTORCONSTRAINT NAME="mainSS" ASSETID="Variables.assetid" ASSETTYPE="Product_P" BUCKET="ss2" /> <ASSETSET.SETSEARCHEDASSETS NAME="as" CONSTRAINT="mainSS" ASSETTYPES="Product_C"/> <ASSETSET.GETATTRIBUTEVALUES NAME="as" ATTRIBUTE="FSIICategoryName" LISTVARNAME="resultlist" TYPENAME="Product_A"/> <LOOP LIST="resultlist"> <CSVAR NAME="resultlist.value"/><BR/> </LOOP>See Also
SEARCHSTATE.ADDHASDESCENDANTCONSTRAINT
SEARCHSTATE.CREATE
ASSETSET.SETSEARCHEDASSETS
ASSETSET.GETATTRIBUTEVALUES
LISTOBJECTS
Home > Contents > Index > ![]()
Oracle XML Tag Reference
Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.