Home > Contents > Index >
assetset:getassetcount
Retrieves an asset count.
Syntax
<assetset:getassetcount name="assetset name" [list="sort attribute list"] [immediateonly="true|false
"] [distinctonly="true|false
"] varname="count variable name"/>Parameters
name (required)
- Input parameter. Name of the assetset object.
list (optional)
- Input parameter. Name of the list that determines sort order. This list has three columns:
attributetypename
- Name of attribute asset type to sort on.attributename
- Name of attribute to sort by, or one of the following special values:
_RATING_
- order by asset rating (Engage only)
_ASSETTYPE_
- order by asset type
direction
- Eitherascending
ordescending
immediateonly
(optional)- Input parameter. Boolean value indicating whether to consider inherited attribute values or not. A
false
value indicates that inherited values should be considered (the default).
distinctonly
(optional)- This selects only the first combination of sorted values for each asset.
varname
(required)- Input and output parameter. As input, name of the variable that holds the assigned count on output.
Description
When called,
assetset:getassetcount
creates the specified variable with the count of table rows that results if assetset:getassetlist were called with similar parameters.NOTE: This tag also causes dependencies to be recorded for all assets that contribute to the returned lists, or if this assetset object is not an enumerated one, then the equivalent of
render:unknowndeps
will be performed.Example
This example counts the number of rows that would result if an
assetset:getassetlist
tag were executed on the assetsetmyassetset
, with sorting on the attributebulbsize
.<listobject:create name="mylistobject" columns="attributetypename,attributename,direction"/> <listobject:addrow name="mylistobject">
<listobject:argument name="attributetypename" value="PAttributes"/> <listobject:argument name="attributename" value="bulbsize"/> <listobject:argument name="direction" value="descending"/></listobject:addrow> <listobject:tolist name="mylistobject" listvarname="listout"/> <!-- Apply the sort list to an assetset and retrieve a resultset list --> <assetset:getassetcount name="myassetset" list="listout" varname="countvar"/>See Also
assetset:getmultiplevalues
assetset:getassetlist
listobject:create
listobject:addrow
listobject:tolist
Home > Contents > Index > ![]()
Oracle JSP Tag Reference
Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.