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 4-25 lists actuate.parameter.ParameterValue functions.
actuate.parameter.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( );
actuate.parameter.ParameterValue.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( );
actuate.parameter.ParameterValue.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( );
actuate.parameter.ParameterValue.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( );
actuate.parameter.ParameterValue.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( );
actuate.parameter.ParameterValue.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( );
actuate.parameter.ParameterValue.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( );
actuate.parameter.ParameterValue.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( );
actuate.parameter.ParameterValue.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( );
actuate.parameter.ParameterValue.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!');
}
actuate.parameter.ParameterValue.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.");
}
actuate.parameter.ParameterValue.setColumnName
Syntax
void ParameterValue.setColumnName(string columnName)
Sets the column name value for this ParameterValue.
Parameters
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");
actuate.parameter.ParameterValue.setColumnType
Syntax
void ParameterValue.setColumnType(string columnType)
Sets the data type of the column for this ParameterValue. Used for queries.
Parameters
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");
actuate.parameter.ParameterValue.setDataType
Syntax
void ParameterValue.setDataType(string dataType)
Sets the dataType value for this ParameterValue.
Parameters
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");
actuate.parameter.ParameterValue.setDisplayName
Syntax
void ParameterValue.setDisplayName(string name)
Sets the displayed name value for this ParameterValue.
Parameters
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");
actuate.parameter.ParameterValue.setGroup
Syntax
void ParameterValue.setGroup(string group)
Sets the group value for this ParameterValue.
Parameters
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");
actuate.parameter.ParameterValue.setIsViewParameter
Syntax
void ParameterValue.setIsViewParameter(boolean isViewParameter)
Sets the isViewParameter value for this ParameterValue.
Parameters
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);
actuate.parameter.ParameterValue.setName
Syntax
void ParameterValue.setName(string name)
Sets the name value for this ParameterValue.
Parameters
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");
actuate.parameter.ParameterValue.setPosition
Syntax
void ParameterValue.setPosition(integer position)
Sets the position value for this ParameterValue.
Parameters
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( ));
actuate.parameter.ParameterValue.setPromptParameter
Syntax
void ParameterValue.setPromptParameter(boolean promptParameter)
Sets the promptParameter value for this ParameterValue.
Parameters
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);
actuate.parameter.ParameterValue.setValue
Syntax
void ParameterValue.setValue(string[ ] value)
Sets the value or values for this ParameterValue.
Parameters
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"});
actuate.parameter.ParameterValue.setValueIsNull
Syntax
void ParameterValue.setValueIsNull(boolean valueIsNull)
Sets the valueIsNull value for this ParameterValue.
Parameters
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);

Additional Links:

Copyright Actuate Corporation 2012