The =parameter(); Scripting Engine function is a function that takes static or variable input and retrieves a selected parameter value or constructs a total parameter token based on input properties
=parameter();
=param();
The parameter function has complex input:
| Property | Datatype | Default value | Description |
|---|---|---|---|
| id | GUID | [REQUIRED] |
The uniqueidentifier of the parameter. This is a GUID-datatype reference to the parameter defined in BA DataCentral |
| alloutput | String | [ALL] | This string controls which string is returned if the all-option is the current selected option for output types val and proc. |
| output | String | val |
The type of parameter usage or output format:
val, total, proc, startperiod and endperiod are supported
|
| prefix | String | and |
Used with output = total only |
| colref | String | Column |
Used with output = total only |
| operator | String | = |
Used with output = total only |
| dateFormat | String | I |
Used with periodic parameters only
I, U, CUSTOM
|
| customDateFormat | String | "" |
Used with periodic parameters only
MM, YYYY etc
|
| period | String | Standard |
Used with periodic parameters only
Standard, Trend
|
| compIdx | Integer |
-1 (all) |
Used with composite key parameters only
-1 = whole node value
0 - n = composite part of node value
|
| fallback | String | [OUTPUTERROR] |
If any error is occurring during this parameter parsing the error message will be returned when fallback is set to [OUTPUTERROR].
If you want your own custom string or a empty string to be returned if the parameter parsing fails, you can provide this string with this property.
|
Examples
=param("id":"233a028b-620a-4927-94f1-2aa7c36d862e");
=param("id":"233a028b-620a-4927-94f1-2aa7c36d862e", "output": "total");
=param("id":"233a028b-620a-4927-94f1-2aa7c36d862e", "prefix": "or", "colref":"dateCol", "dateFormat": "I", "output": "total");[ALL] [empty-string] (blank) [empty-string] (blank)
year
and column between ('2011-01-01 00:00:00' and '2011-12-31 23:59:59')
or dateCol between ('2011-01-01 00:00:00' and '2011-12-31 23:59:59')
=param("id":"75ed8d1b-00bb-4859-9632-2ce314bee362");
=param("id":"75ed8d1b-00bb-4859-9632-2ce314bee362", "colref":"newColumn", "operator": ">=", "output": "total");
=param("id":"75ed8d1b-00bb-4859-9632-2ce314bee362", "output": "proc");[ALL] [empty-string] (blank) [ALL]
12 and newColumn >= 12 12
12,16 and newColumn in (12,16) '12|16'
ATTN: This property is used in conjunction with output type set to total only!
The setting is a simple string that will be placed first in the condition line:
and columnA = 5Default prefix is and, but you can set it to any string that would make your query syntax valid.
Often used prefixes are: or, where (attn: remember that this line is not rendered if all-option is selected!)
ATTN: This property is used in conjunction with output type set to total only!
The setting controls the name of the column which the parameter should reference
and columnA = 5ATTN: This property is used in conjunction with output type set to total only!
This setting controls the operator of the expression.
and columnA = 5