Class actuate.parameter.ParameterValue
Description
ParameterValue is a container for the value of Parameter to be passed to a report for processing. When a user sets a value in the interface, the corresponding ParameterValue must change.
Because ParameterValue is much smaller that ParameterDefinition, it is the recommended means of communicating to the server that a parameter value has changed or passing a parameter value to a viewer element. Sending an entire ParameterDefinition has a larger effect on system performance.
Constructor
Syntax
actuate.parameter.ParameterValue( )
Constructs a new ParameterValue object.
Function summary
Table 44‑25 lists actuate.parameter.ParameterValue functions.
Table 44‑25 actuate.parameter.ParameterValue functions
Function
Description
Gets the name of the column in this ParameterValue
Gets the data type value of the column for this ParameterValue
Gets the dataType value for this ParameterValue
Gets the displayed name for this ParameterValue
Gets the group value for this ParameterValue
Gets the name value for this ParameterValue
Gets the position value for this ParameterValue
Gets the promptParameter value for this ParameterValue
Gets the value or values for this ParameterValue
Gets the valueIsNull value for this ParameterValue
Gets the isViewParameter value for this ParameterValue
Sets the name of the column in this ParameterValue
Sets the data type value of the column for this ParameterValue
Sets the dataType value for this ParameterValue
Sets the displayed name for this ParameterValue
Sets the group value for this ParameterValue
Sets the isViewParameter value for this ParameterValue
Sets the name value for this ParameterValue
Sets the position value for this ParameterValue
Sets the promptParameter value for this ParameterValue
Sets the value for this ParameterValue
Sets the valueIsNull value for this ParameterValue
getColumnName
Syntax
string ParameterValue.getColumnName( )
Gets the column name value for this ParameterValue. Columns are supported as part of ad hoc parameters.
Returns
String. The name of the column.
Example
To store the column name for the parameter value pvalue in a variable called columnname, use code similar to the following:
var columnname = pvalue.getColumnName( );
getColumnType
Syntax
string ParameterValue.getColumnType( )
Gets the data type value of the column for this ParameterValue. Columns are supported as part of ad hoc parameters.
Returns
String. Possible values are null, "", "Currency", "Date", "DateOnly", "Time", "Double", "Integer", "String", "Boolean", "Structure", "Table", and "Unknown".
Example
To store the column type for the parameter value pvalue in a variable called columntype, use code similar to the following:
var columntype = pvalue.getColumnType( );
getDataType
Syntax
string ParameterValue.getDataType( )
Gets the dataType value for this ParameterValue.
Returns
String. Possible values are null, "", "Currency", "Date", "DateOnly", "Time", "Double", "Integer", "String", "Boolean", "Structure", "Table", and "Unknown".
Example
To store the data type for the parameter value pvalue in a variable called type, use code similar to the following:
var type = pvalue.getDataType( );
getDisplayName
Syntax
string ParameterValue.getDisplayName( )
Gets the displayed name for this ParameterValue.
Returns
String. The displayed name.
Example
To store the displayed name of the parameter value pvalue in a variable called displayedName, use code similar to the following:
var displayedName = pvalue.getDisplayName( );
getGroup
Syntax
string ParameterValue.getGroup( )
Gets the group value for this ParameterValue.
Returns
String.
Example
To store the group that the parameter value pvalue belongs to in a variable called group, use code similar to the following:
var group = pvalue.getGroup( );
getName
Syntax
string ParameterValue.getName( )
Gets the name value for this ParameterValue.
Returns
String.
Example
To store the name of the parameter value pvalue in a variable called name, use code similar to the following:
var name = pvalue.getName( );
getPosition
Syntax
integer ParameterValue.getPosition( )
Gets the position value for this ParameterValue.
Returns
Integer.
Example
To save the position of the parameter value pvalue in the parameter list to a variable called pos, use code similar to the following:
var pos = pvalue.getPosition( );
getPromptParameter
Syntax
boolean ParameterValue.getPromptParameter( )
Gets the promptParameter value for this ParameterValue.
Returns
Boolean.
Example
To store the prompt parameter of the parameter value pvalue in a variable called prompt, use code similar to the following:
var prompt = pvalue.getPromptParameter( );
getValue
Syntax
string[ ] ParameterValue.getValue( )
Gets the value values for this ParameterValue.
Returns
String or array of strings. The value or values of this ParameterValue object.
Example
To store the value of the parameter value pvalue in a variable called value, use code similar to the following:
var value = pvalue.getValue( );
getValueIsNull
Syntax
boolean ParameterValue.getValueIsNull( )
Gets the valueIsNull value for this ParameterValue.
Returns
Boolean. True indicates that this ParameterValue is null.
Example
To alert the user that the value of the parameter value pvalue is null, use code similar to the following:
if (pavalue.getValueIsNull( )){
alert('Default value is null!');
}
isViewParameter
Syntax
boolean ParameterValue.isViewParameter( )
Gets the isViewParameter value for this ParameterValue.
Returns
Boolean. True indicates that this ParameterValue is visible.
Example
To set specific help text for the parameter value pvalue if it is a view‑time parameter, use code similar to the following:
if (pvalue.isViewParameter( )){
pvalue.setHelpText("This is a view-time parameter.");
}
setColumnName
Syntax
void ParameterValue.setColumnName(string columnName)
Sets the column name value for this ParameterValue.
Parameter
columnName
String. The name of the column.
Example
To set the column name for the parameter value pvalue to Year, use code similar to the following:
pvalue.setColumnName("Year");
setColumnType
Syntax
void ParameterValue.setColumnType(string columnType)
Sets the data type of the column for this ParameterValue. Used for queries.
Parameter
columnType
String. Possible values are "Currency", "Date", "DateOnly", "Time", "Double", "Integer", "String", "Boolean", "Structure", "Table", and "Unknown".
Example
To set the column type for the parameter value pvalue to Date, use code similar to the following:
pvalue.setColumnType("Date");
setDataType
Syntax
void ParameterValue.setDataType(string dataType)
Sets the dataType value for this ParameterValue.
Parameter
dataType
String. Possible values are "Currency", "Date", "DateOnly", "Time", "Double", "Integer", "String", "Boolean", "Structure", "Table", and "Unknown".
Example
To set the data type for the parameter value pvalue to Date, use code similar to the following:
pvalue.setDataType("Date");
setDisplayName
Syntax
void ParameterValue.setDisplayName(string name)
Sets the displayed name value for this ParameterValue.
Parameter
name
String. A displayed parameter name.
Example
To set the display name of the parameter value pvalue to Year, use code similar to the following:
pvalue.setDisplayName("Year");
setGroup
Syntax
void ParameterValue.setGroup(string group)
Sets the group value for this ParameterValue.
Parameter
group
String. The name of the group.
Example
To set the group for the parameter value pvalue to Customer Details, use code similar to the following:
pvalue.setGroup("Customer Details");
setIsViewParameter
Syntax
void ParameterValue.setIsViewParameter(boolean isViewParameter)
Sets the isViewParameter value for this ParameterValue.
Parameter
isViewParameter
Boolean. True indicates a view-time parameter.
Example
To make the parameter value pvalue into a view-time parameter, use code similar to the following:
pvalue.setIsViewParameter(true);
setName
Syntax
void ParameterValue.setName(string name)
Sets the name value for this ParameterValue.
Parameter
name
String. A parameter name.
Example
To set the name of the parameter value pvalue to Year, use code similar to the following:
pvalue.setName("Year");
setPosition
Syntax
void ParameterValue.setPosition(integer position)
Sets the position value for this ParameterValue.
Parameter
position
Integer. The position from the top of the parameter list.
Example
To move the parameter value pvalue one place farther down in the parameter list, use code similar to the following:
pvalue.setPosition(++pvalue.getPosition( ));
setPromptParameter
Syntax
void ParameterValue.setPromptParameter(boolean promptParameter)
Sets the promptParameter value for this ParameterValue.
Parameter
promptParameter
Boolean. True indicates that this parameter prompts the user.
Example
To set the parameter value pvalue to not prompt the user, use code similar to the following:
pvalue.setPromptParameter(false);
setValue
Syntax
void ParameterValue.setValue(string[ ] value)
Sets the value or values for this ParameterValue.
Parameter
value
String or array of strings. The value or values of this ParameterValue object.
Example
To set the value of the parameter value pvalue to 2010, use code similar to the following:
pvalue.setValue("2010");
To set the values of the ParameterValue object pvalues to 2008, 2009, and 2010, use code similar to the following:
pvalue.setValue({"2008", "2009", "2010"});
setValueIsNull
Syntax
void ParameterValue.setValueIsNull(boolean valueIsNull)
Sets the valueIsNull value for this ParameterValue.
Parameter
valueIsNull
Boolean. True indicates that this ParameterValue is null.
Example
To set the value of parameter value pvalue to null, use code similar to the following:
pvalue.setValueIsNull(true);