Class actuate.parameter.ParameterDefinition
Description
The ParameterDefinition object contains all of the qualities, values, names, and conditions for a parameter. A ParameterDefinition object can display options to the user and respond to user-generated events. The actuate.Parameter class downloads an array of ParameterDefinition objects with downloadParameters( ). The order of this array is also the order in which the parameters are displayed. Parameters can be grouped to divide the parameters on the page into logical sets under a heading.
This class requires significant memory and bandwidth resources. ParameterValue is much smaller than ParameterDefinition. ParameterValue is the more efficient way to communicate to the server that a parameter value has changed.
Constructor
Syntax
actuate.parameter.ParameterDefinition( )
Constructs a new ParameterDefinition object.
Function summary
Table 44‑24 lists actuate.parameter.ParameterDefinition functions.
Table 44‑24 actuate.parameter.ParameterDefinition functions
Function
Description
Gets the auto suggest threshold value for this ParameterDefinition
Gets the cascadingParentName value for this ParameterDefinition
Gets the columnName value for this ParameterDefinition
Gets the columnType value for this ParameterDefinition
Gets the controlType value for this ParameterDefinition
Gets the auto suggest current display name for the current value of this ParameterDefinition
Gets the dataType value for this ParameterDefinition
Gets the defaultValue value for this ParameterDefinition
Gets a flag if the default value is null for this ParameterDefinition
Gets the displayName value for this ParameterDefinition
Gets the group value for this ParameterDefinition
Gets the helpText value for this ParameterDefinition
Gets the name value for this ParameterDefinition
Gets the list of valid operators
Gets the position value for this ParameterDefinition
Gets the selectNameValueList value for this ParameterDefinition
Gets the selectValueList value for this ParameterDefinition
Returns whether the parameter is a dynamic filter
Gets the isHidden value for this ParameterDefinition
Gets the isPassword value for this ParameterDefinition
Gets the isRequired value for this ParameterDefinition
Gets the isViewParameter value for this ParameterDefinition
Sets the auto suggest threshold value for this ParameterDefinition
Sets the cascadingParentName value for this ParameterDefinition
Sets the columnName value for this ParameterDefinition
Sets the columnType value for this ParameterDefinition
Sets the controlType value for this ParameterDefinition
Sets the current display name for this ParameterDefinition
Sets the dataType value for this ParameterDefinition
Sets the defaultValue value for this ParameterDefinition
Sets the defaultValue to null for this ParameterDefinition
Sets the displayName value for this ParameterDefinition
Sets the group value for this ParameterDefinition
Sets the helpText value for this ParameterDefinition
Sets whether the parameter is a dynamic filter
Sets the isHidden value for this ParameterDefinition
Sets the isMultiSelectControl value for this ParameterDefinition
Sets the isPassword value for this ParameterDefinition
Sets the isRequired value for this ParameterDefinition
Sets the isViewParameter value for this ParameterDefinition
Sets the name value for this ParameterDefinition
Sets the position value for this ParameterDefinition
Sets the selectNameValueList value for this ParameterDefinition
Sets the selectValueList value for this ParameterDefinition
getAutoSuggestThreshold
Syntax
integer ParameterDefinition.getAutoSuggestThreshold( )
Gets the auto suggest threshold value for this ParameterDefinition. The auto suggest threshold determines the number of characters a user types in before they are given suggestions from auto suggest.
Returns
Integer.
Example
To store the auto suggest threshold of the parameter definition paramdef in a variable called threshold, use code similar to the following:
var threshold = paramdef.getAutoSuggestThreshold( );
getCascadingParentName
Syntax
string ParameterDefinition.getCascadingParentName( )
Gets the cascadingParentName value for this ParameterDefinition. A cascading parent parameter is only used when one parameter depends upon another.
Returns
String.
Example
To store the cascading parent name of the parameter definition paramdef in a variable called parentname, use code similar to the following:
var parentname = paramdef.getCascadingParentName( );
getColumnName
Syntax
string ParameterDefinition.getColumnName( )
Gets the columnName value for this ParameterDefinition. This setting sets the column to retrieve data from for a dynamic filter parameter that performs a query.
This setting has no effect on other types of parameters.
Returns
String.
Example
To store the column name of the parameter definition paramdef in a variable called columnname, use code similar to the following:
var columnname = paramdef.getColumnName( );
getColumnType
Syntax
string ParameterDefinition.getColumnType( )
Gets the columnType value for this ParameterDefinition. This setting sets the data type queried by an ad hoc parameter that performs a query.
This setting has no effect on other types 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 of the parameter definition paramdef in a variable called columntype, use code similar to the following:
var columntype = paramdef.getColumnType( );
getControlType
Syntax
string ParameterDefinition.getControlType( )
Gets the controlType value for this ParameterDefinition. It determines the form element displayed for the user to set the parameter value.
Returns
String. Possible values are: null, "", "ControlRadioButton", "ControlList", "ControlListAllowNew", and "ControlCheckBox".
Example
To store the control type string for the parameter definition paramdef in a variable called controltype, use code similar to the following:
var controltype = paramdef.getControlType( );
getCurrentDisplayName
Syntax
string ParameterDefinition.getCurrentDisplayName( )
Gets the current display name for this ParameterDefinition.
Returns
String.
Example
To store the current display name of the parameter definition paramdef in a variable called displayname, use code similar to the following:
var displayname = paramdef.getDisplayName( );
getDataType
Syntax
string ParameterDefinition.getDataType( )
Gets the dataType value for this ParameterDefinition.
Returns
String. Possible values are: "Currency", "Date", "DateOnly", "Time", "Double", "Integer", "String", "Boolean", "Structure", "Table", and "Unknown".
Example
To store the data type of the parameter definition paramdef in a variable called type, use code similar to the following:
var type = paramdef.getDataType( );
getDefaultValue
Syntax
string ParameterDefinition.getDefaultValue( )
Gets the defaultValue value for this ParameterDefinition, if applicable.
Returns
String.
Example
To store the default value as a string for the parameter definition paramdef in a variable called default, use code similar to the following:
var default = paramdef.getDefaultValue( );
getDefaultValueIsNull
Syntax
boolean ParameterDefinition.getDefaultValueIsNull( )
Returns true when the parameter’s default value is null.
Returns
Boolean.
Example
To alert the user that the default value is null for the parameter definition paramdef, use code similar to the following:
if (paramdef.getDefaultValueIsNull( )){
alert('Default value is null!');
}
getDisplayName
Syntax
string ParameterDefinition.getDisplayName( )
Gets the displayName for this ParameterDefinition.
Returns
String.
Example
To store the displayed name for the parameter definition paramdef in a variable called displayname, use code similar to the following:
var displayname = paramdef.getDisplayName( );
getGroup
Syntax
string ParameterDefinition.getGroup( )
Gets the group for this ParameterDefinition, indicating if it is a member of a group.
Returns
String. A group name, or null if there is no group.
Example
To print the group name for the parameter definition paramdef to the current document, use code similar to the following:
document.write(paramdef.getGroup( ));
getHelpText
Syntax
string ParameterDefinition.getHelpText( )
Gets the helpText for this ParameterDefinition.
Returns
String. The help text.
Example
To store the help text for the parameter definition paramdef in a variable called helptext, use code similar to the following:
var helptext = paramdef.getHelpText( );
getName
Syntax
string ParameterDefinition.getName( )
Gets the name for this ParameterDefinition.
Returns
String. The parameter name.
Example
To store the name for the parameter definition paramdef in a variable called paramname, use code similar to the following:
var paramname = paramdef.getName( );
getOperatorList
Syntax
string[ ] ParameterDefinition.getOperatorList( )
Gets the operator list for this ParameterDefinition.
Returns
An array of strings containing the operator list.
Example
To store the list of operators for the parameter definition paramdef in a variable called ops, use code similar to the following:
var ops = new Array( );
ops = paramdef.getOperatorList( );
getPosition
Syntax
Integer ParameterDefinition.getPosition( )
Gets the position in the array for this ParameterDefinition.
Returns
Integer.
Example
To store the position of the parameter definition paramdef in a variable called position, use code similar to the following:
var position = paramdef.getPosition( );
getSelectNameValueList
Syntax
selectNameValueList[ ] ParameterDefinition.getSelectNameValueList( )
Gets the selectNameValueList for this ParameterDefinition. This list applies if the parameter is set with a selection list.
Returns
Array of actuate.parameter.NameValuePair objects.
Example
To retrieve the name-value pair list for the parameter definition paramdef and put it into a new array, use code similar to the following:
var namevalues = new array( );
namevalues = paramdef.getSelectNameValueList( ).slice( );
getSelectValueList
Syntax
string[ ] ParameterDefinition.getSelectValueList( )
Gets the selectValueList for this ParameterDefinition. This list applies when the parameter is set with a selection list.
Returns
An array of strings containing the select value list.
Example
To retrieve the list of values selectable for the parameter definition paramdef and put it into a new array, use code similar to the following:
var selectvalues = new array( );
selectvalues = paramdef.getSelectValueList( ).slice( );
isAdHoc
Syntax
boolean ParameterDefinition.isAdHoc( )
Returns true when this parameter is a dynamic filter parameter.
Returns
Boolean. True when this parameter is a dynamic filter.
Example
To set the default value to null for the parameter definition paramdef if it is a dynamic filter parameter, use code similar to the following:
if (paramdef.isAdHoc( )){
paramdef.setDefaultValueIsNull(true);
}
isHidden
Syntax
boolean ParameterDefinition.isHidden( )
Gets the isHidden value for this ParameterDefinition.
Returns
Boolean. True indicates that this parameter is hidden.
Example
To reveal a parameter with the parameter definition paramdef if it is hidden, use code similar to the following:
if (paramdef.isHidden( )){
paramdef.setIsHidden(false);
}
isPassword
Syntax
boolean ParameterDefinition.isPassword( )
Gets the isPassword value for this ParameterDefinition.
Returns
Boolean. True indicates that the parameter is a password.
Example
To set the parameter definition paramdef as required if it is a password parameter, use code similar to the following:
if (paramdef.isPassword( )){
paramdef.setIsRequired(true);
}
isRequired
Syntax
boolean ParameterDefinition.isRequired( )
Gets the isRequired value for this ParameterDefinition.
Returns
Boolean. True indicates that the parameter is required.
Example
To set specific help text for the parameter definition paramdef if it is a required parameter, use code similar to the following:
if (paramdef.isRequired( )){
paramdef.setHelpText("This parameter is required.");
}
isViewParameter
Syntax
boolean ParameterDefinition.isViewParameter( )
Gets the isViewParameter value for this ParameterDefinition.
Returns
Boolean. True indicates that the parameter is a view-time parameter. False indicates that the parameter is a run-time parameter.
Example
To set specific help text for the parameter definition paramdef if it is a view‑time parameter, use code similar to the following:
if (paramdef.isViewParameter( )){
paramdef.setHelpText("This is a view-time parameter.");
}
setAutoSuggestThreshold
Syntax
void ParameterDefinition.setAutoSuggestThreshold(integer threshold)
Sets the auto suggest threshold for this ParameterDefinition. The auto suggest threshold determines the number of characters a user types in before they are given suggestions from auto suggest.
Parameter
threshold
Integer.
Example
To always show the auto suggest dialog for the parameter definition paramdef, use code similar to the following:
paramdef.setAutoSuggestThreshold(0);
setCascadingParentName
Syntax
void ParameterDefinition.setCascadingParentName(string cascadingParentName)
Sets the cascadingParentName for this ParameterDefinition. This sets another parameter as this parameter’s parent.
Parameter
cascadingParentName
String.
Example
To set the parent name of the parameter definition paramdef to "Clark", use code similar to the following:
paramdef.setCascadingParentName("Clark");
setColumnName
Syntax
void ParameterDefinition.setColumnName(string columnName)
Sets the columnName for this ParameterDefinition. Used for queries.
Parameter
columnName
String.
Example
To set the parameter definition paramdef to access the ProductName column, use code similar to the following:
paramdef.setColumnName("ProductName");
setColumnType
Syntax
void ParameterDefinition.setColumnType(string columnType)
Sets the columnType for this ParameterDefinition. Used for queries.
Parameter
columnType
String. Possible values are null, "Currency", "Date", "DateOnly", "Time", "Double", "Integer", "String", "Boolean", "Structure", "Table", and "Unknown".
Example
To allow the parameter definition paramdef to interpret a column as untyped data, use code similar to the following:
paramdef.setColumnType("Unknown");
setControlType
Syntax
void ParameterDefinition.setControlType(string controlType)
Sets the control type of this ParameterDefinition.
Parameter
controlType
String. Possible values are null, "", "AutoSuggest", "ControlRadioButton", "ControlList", "ControlListAllowNew", and "ControlCheckBox".
Example
To set the parameter definition paramdef to use a control list, use code similar to the following:
paramdef.setControlType("ControlList");
setCurrentDisplayName
Syntax
void ParameterDefinition.setCurrentDisplayName(string currentDiplayName)
Sets the displayed name for this parameter.
Parameter
currentDisplayName
String.
Example
To set the display name for the parameter definition paramdef to "Year", use code similar to the following:
paramdef.setCurrentDisplayName("Year");
setDataType
Syntax
void ParameterDefinition.setDataType(string dataType)
Sets the dataType for this ParameterDefinition.
Parameter
dataType
String. Possible values are "Currency", "Date", "DateOnly", "Time", "Double", "Integer", "String", "Boolean", "Structure", "Table", and "Unknown".
Example
To set the parameter definition paramdef data type to date, use code similar to the following:
paramdef.setDataType("Date");
setDefaultValue
Syntax
void ParameterDefinition.setDefaultValue(string defaultValue)
Sets the default value for this ParameterDefinition.
Parameter
defaultValue
String.
Example
To set the default value of parameter definition paramdef to "2010", use code similar to the following:
paramdef.setDefaultValue("2010");
setDefaultValueIsNull
Syntax
void ParameterDefinition.setDefaultValue(boolean value)
When true, sets the default value for this ParameterDefinition to null. Sets the default value to no value in all other cases.
Parameter
value
Boolean.
Example
To set the default value of parameter definition paramdef to null, use code similar to the following:
paramdef.setDefaultValueIsNull(true);
setDisplayName
Syntax
void ParameterDefinition.setDisplayName(string displayName)
Sets the name to display on the parameter page for this ParameterDefinition.
Parameter
displayName
String.
Example
To set the displayed name of parameter definition paramdef to "Year", use code similar to the following:
paramdef.setDisplayName("Year");
setGroup
Syntax
void ParameterDefinition.setGroup(string group)
Sets the group value for this ParameterDefinition.
Parameter
group
String.
Example
To assign the parameter definition paramdef to the "Customer Details" parameter group, use code similar to the following:
paramdef.setGroup("Customer Details");
setHelpText
Syntax
void ParameterDefinition.setHelpText(string helpText)
Sets the helpText value for this ParameterDefinition.
Parameter
helpText
String.
Example
To set specific help text for the parameter definition paramdef if it is a required parameter, use code similar to the following:
if (paramdef.isRequired( )){
paramdef.setHelpText("This parameter is required.");
}
setIsAdHoc
Syntax
void ParameterDefinition.setIsAdHoc(boolean isAdHoc)
Sets this parameter as a dynamic filter parameter.
Parameter
isAdHoc
Boolean. True makes this parameter into a dynamic filter.
Example
To enable the parameter definition paramdef to accept dynamic filter values, use code similar to the following:
paramdef.setIsAdHoc(true);
setIsHidden
Syntax
void ParameterDefinition.setIsHidden(boolean isHidden)
Sets the parameter to hidden.
Parameter
isHidden
Boolean. True hides the parameter.
Example
To hide a parameter defined by a parameter definition called paramdef, use code similar to the following:
paramdef.setIsHidden(true);
setIsMultiSelectControl
Syntax
void ParameterDefinition.setIsMultiSelectControl(boolean isMultiSelect)
Sets the parameter to accept multiple selected values.
Parameter
isMultiSelect
Boolean. True allows multiple selected values to be set for this parameter.
Example
To allow a parameter defined by a parameter definition called paramdef to accept multiple selected values, use code similar to the following:
paramdef.setIsMultiSelectControl(true);
setIsPassword
Syntax
void ParameterDefinition.setIsPassword(boolean isPassword)
Sets this parameter to treat its value as a password, which hides the input on the page and encrypts the value.
Parameter
isPassword
Boolean. True indicates a password value.
Example
To set the parameter type accepted by the parameter definition paramdef to password, use code similar to the following:
paramdef.setIsPassword(true);
setIsRequired
Syntax
void ParameterDefinition.setIsRequired(boolean isRequired)
Sets the parameter to required.
Parameter
isRequired
Boolean. True indicates a mandatory parameter.
Example
To make the parameter defined by the parameter definition paramdef mandatory, use code similar to the following:
paramdef.setIsRequired(true);
setIsViewParameter
Syntax
void ParameterDefinition.setIsViewParameter(boolean isViewParameter)
Sets the isViewParameter value for this ParameterDefinition.
Parameter
isViewParameter
Boolean.
Example
To make the parameter defined by the parameter definition paramdef a view‑time parameter, use code similar to the following:
paramdef.setIsViewParameter(true);
setName
Syntax
void ParameterDefinition.setName(string name)
Sets the name to use internally for this ParameterDefinition.
Parameter
name
String.
Example
To set the internal name of the parameter definition paramdef to Year, use code similar to the following:
paramdef.setName("Year");
setPosition
Syntax
void ParameterDefinition.setPosition(integer position)
Sets the position value for this ParameterDefinition. The index indicates the position in the array of the ParameterDefinition.
Parameter
position
Integer.
Example
To shift the parameter definition paramdef down on position in the parameter array, use code similar to the following:
paramdef.setPosition(++paramdef.getPosition( ));
setSelectNameValueList
Syntax
void ParameterDefinition.setSelectNameValueList(actuate.parameter.NameValuePair[ ] selectNameValueList)
Sets the selectNameValueList value for this ParameterDefinition.
Parameter
selectNameValueList
Array of actuate.parameter.NameValuePair objects.
Example
To set the parameter definition paramdef to select the same name-value list as the parameter definition nparam, use code similar to the following:
paramdef.setSelectNameValueList(nparam.getSelectNameValueList( ));
setSelectValueList
Syntax
void ParameterDefinition.setSelectValueList(array[ ] selectValueList)
Sets the selectValueList value for this ParameterDefinition.
Parameter
selectValueList
Array.
Example
To set the parameter definition paramdef to select the values 2007‑2009, use code similar to the following:
var values = new Array("2007", "2008", "2009");
paramdef.setSelectValueList(values);