Home > Contents > Index >
SEARCHSTATE.DELETECONSTRAINT
Deletes a specific attribute constraint from a searchstate.
Syntax
<SEARCHSTATE.DELETECONSTRAINT
NAME="ssname
" [BUCKET="bucketname
"] [TYPENAME="asset type
"]
ATTRIBUTE="attribname
"/>Parameters
NAME
(required)- Input parameter. Name of an object representing a searchstate.
BUCKET
(optional)- Input parameter. Bucket name. If not specified, the attribute name is used. Use this parameter to indicate which constraint you need when the same attribute is used in multiple contstraints. A bucket is an alias and functions similar to an inner join in SQL; when you have multiple tables that have columns of the same name, you must specify the table name to indicate which column you are requesting.
TYPENAME
(optional)- Input parameter. The internal asset name for the attribute (either
CAttributes
for content attribute, orPAttributes
for product attribute). If you do not specifyTYPENAME
, a value is supplied from a property in thegator.ini
property file:mwb.defaultattributes=PAttributes.
The default value is set to bePAttributes
and may be changed to be the name of any custom attribute asset types you create.
ATTRIBUTE
(required)- Input parameter. Name of the attribute whose constraint should be deleted.
Error Numbers
The possible values of
errno
include:
Value Description -10004 A required parameter is missing. -13050 General error.Example
This code serializes a
SEARCHSTATE
"origSS" containing a simple constraint and creates a variable which contains the string representation.<SEARCHSTATE.CREATE NAME="ss" /> <SEARCHSTATE.ADDSIMPLESTANDARDCONSTRAINT NAME="ss" ATTRIBUTE="productdesc" VALUE="LU50/90/27"/> <SEARCHSTATE.TOSTRING NAME="ss" VARNAME="searchstring"/> <CSVAR NAME="searchstring"/><br/>The following then deletes the constraint in a new searchstate "newSS" generated from the string representation. This code then sets this
SEARCHSTATE
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:<SEARCHSTATE.CREATE NAME="newSS" /> <SEARCHSTATE.FROMSTRING NAME="newSS" VALUE="Variables.searchstring"/> <SEARCHSTATE.DELETECONSTRAINT NAME="newSS" ATTRIBUTE="productdesc" /> <ASSETSET.SETSEARCHEDASSETS NAME="as" CONSTRAINT="newSS" ASSETTYPES="Products"/> <ASSETSET.GETATTRIBUTEVALUES NAME="as" ATTRIBUTE="cat2" LISTVARNAME="resultlist"/> <LOOP LIST="resultlist"> <CSVAR NAME="resultlist.value"/><br/> </LOOP>See Also
SEARCHSTATE.CREATE
SEARCHSTATE.ADDSIMPLELIKECONSTRAINT
SEARCHSTATE.FROMSTRING
SEARCHSTATE.TOSTRING
Home > Contents > Index > Oracle XML Tag Reference
Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.