Expressions
Expressions are used by some model commands to define a filter or a calculation.
An expressions is an array of one or more expression parts. Each expression part can be one of the following objects:
- A column reference.
- A member unique name.
- A string, such as
"="
or"||"
. - An
id
of a model object, such as{"id":"133fd4f9bf904747ba9d3f89b50e4d4b"}
. - The XML representation of an
expression
object, as documented in the model schema reference in the IBM Cognos Software Development Kit Framework Manager Developer Guide. An example is"<expression><refobj>[Model].[Time].[levels].[Year].[Current Year]<\/refobj> > 2000<\/expression>"
Column reference
A column reference consists of the following 4 name-value pairs.
- columnName
- Name of the column in the data source.
- dataSourceRef
id
of the data source.- objectRef
id
of the referred object.- tableName
- Name of the table in the data source.
For an example of this type of expression, see Creating a relationship between the relational dimension and the measure dimension
Member unique name
A member unique name consists of the following 3 name-value pairs.
- caption
- A caption for the member unique name.
- path
- The path to the object in the Members folder in IBM® Cognos® Cube Designer.
- member
- The
id
of the model object referred to.
For an example of this type of expression, see Create calculated members and measures