ConnectionParameter

ConnectionParameter class

Specifies properties about any parameters used with external data connections Parameters are valid for ODBC and web queries.

class ConnectionParameter;

Properties

PropertyTypeDescription
sqlTypeSqlDataTypeSQL data type of the parameter. Only valid for ODBC sources.
refreshOnChangebooleanFlag indicating whether the query should automatically refresh when the contents of a cell that provides the parameter value changes. If true, then external data is refreshed using the new parameter value every time there’s a change. If false, then external data is only refreshed when requested by the user, or some other event triggers refresh (e.g., workbook opened).
promptstringPrompt string for the parameter. Presented to the spreadsheet user along with input UI to collect the parameter value before refreshing the external data. Used only when parameterType = prompt.
typeConnectionParameterTypeType of parameter used. If the parameterType=value, then the value from boolean, double, integer, or string will be used. In this case, it is expected that only one of {boolean, double, integer, or string} will be specified.
namestringThe name of the parameter.
cellReferencestringCell reference indicating which cell’s value to use for the query parameter. Used only when parameterType is cell.
valueObjectNon-integer numeric value,Integer value,String value or Boolean value to use as the query parameter. Used only when parameterType is value.

Methods

MethodDescription
getSqlType()@deprecated. Please use the ‘sqlType’ property instead. SQL data type of the parameter. Only valid for ODBC sources.
setSqlType(SqlDataType)@deprecated. Please use the ‘sqlType’ property instead. SQL data type of the parameter. Only valid for ODBC sources.
getRefreshOnChange()@deprecated. Please use the ‘refreshOnChange’ property instead. Flag indicating whether the query should automatically refresh when the contents of a cell that provides the parameter value changes. If true, then external data is refreshed using the new parameter value every time there’s a change. If false, then external data is only refreshed when requested by the user, or some other event triggers refresh (e.g., workbook opened).
setRefreshOnChange(boolean)@deprecated. Please use the ‘refreshOnChange’ property instead. Flag indicating whether the query should automatically refresh when the contents of a cell that provides the parameter value changes. If true, then external data is refreshed using the new parameter value every time there’s a change. If false, then external data is only refreshed when requested by the user, or some other event triggers refresh (e.g., workbook opened).
getPrompt()@deprecated. Please use the ‘prompt’ property instead. Prompt string for the parameter. Presented to the spreadsheet user along with input UI to collect the parameter value before refreshing the external data. Used only when parameterType = prompt.
setPrompt(string)@deprecated. Please use the ‘prompt’ property instead. Prompt string for the parameter. Presented to the spreadsheet user along with input UI to collect the parameter value before refreshing the external data. Used only when parameterType = prompt.
getType()@deprecated. Please use the ’type’ property instead. Type of parameter used. If the parameterType=value, then the value from boolean, double, integer, or string will be used. In this case, it is expected that only one of {boolean, double, integer, or string} will be specified.
setType(ConnectionParameterType)@deprecated. Please use the ’type’ property instead. Type of parameter used. If the parameterType=value, then the value from boolean, double, integer, or string will be used. In this case, it is expected that only one of {boolean, double, integer, or string} will be specified.
getName()@deprecated. Please use the ’name’ property instead. The name of the parameter.
setName(string)@deprecated. Please use the ’name’ property instead. The name of the parameter.
getCellReference()@deprecated. Please use the ‘cellReference’ property instead. Cell reference indicating which cell’s value to use for the query parameter. Used only when parameterType is cell.
setCellReference(string)@deprecated. Please use the ‘cellReference’ property instead. Cell reference indicating which cell’s value to use for the query parameter. Used only when parameterType is cell.
getValue()@deprecated. Please use the ‘value’ property instead. Non-integer numeric value,Integer value,String value or Boolean value to use as the query parameter. Used only when parameterType is value.
setValue(Object)@deprecated. Please use the ‘value’ property instead. Non-integer numeric value,Integer value,String value or Boolean value to use as the query parameter. Used only when parameterType is value.
isNull()Checks whether the implementation object is null.

sqlType

SQL data type of the parameter. Only valid for ODBC sources.

sqlType : SqlDataType;

refreshOnChange

Flag indicating whether the query should automatically refresh when the contents of a cell that provides the parameter value changes. If true, then external data is refreshed using the new parameter value every time there’s a change. If false, then external data is only refreshed when requested by the user, or some other event triggers refresh (e.g., workbook opened).

refreshOnChange : boolean;

prompt

Prompt string for the parameter. Presented to the spreadsheet user along with input UI to collect the parameter value before refreshing the external data. Used only when parameterType = prompt.

prompt : string;

type

Type of parameter used. If the parameterType=value, then the value from boolean, double, integer, or string will be used. In this case, it is expected that only one of {boolean, double, integer, or string} will be specified.

type : ConnectionParameterType;

name

The name of the parameter.

name : string;

cellReference

Cell reference indicating which cell’s value to use for the query parameter. Used only when parameterType is cell.

cellReference : string;

value

Non-integer numeric value,Integer value,String value or Boolean value to use as the query parameter. Used only when parameterType is value.

value : Object;

getSqlType()

@deprecated. Please use the ‘sqlType’ property instead. SQL data type of the parameter. Only valid for ODBC sources.

getSqlType() : SqlDataType;

Returns

SqlDataType

setSqlType(SqlDataType)

@deprecated. Please use the ‘sqlType’ property instead. SQL data type of the parameter. Only valid for ODBC sources.

setSqlType(value: SqlDataType) : void;

Parameters:

ParameterTypeDescription
valueSqlDataTypeThe value to set.

getRefreshOnChange()

@deprecated. Please use the ‘refreshOnChange’ property instead. Flag indicating whether the query should automatically refresh when the contents of a cell that provides the parameter value changes. If true, then external data is refreshed using the new parameter value every time there’s a change. If false, then external data is only refreshed when requested by the user, or some other event triggers refresh (e.g., workbook opened).

getRefreshOnChange() : boolean;

setRefreshOnChange(boolean)

@deprecated. Please use the ‘refreshOnChange’ property instead. Flag indicating whether the query should automatically refresh when the contents of a cell that provides the parameter value changes. If true, then external data is refreshed using the new parameter value every time there’s a change. If false, then external data is only refreshed when requested by the user, or some other event triggers refresh (e.g., workbook opened).

setRefreshOnChange(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getPrompt()

@deprecated. Please use the ‘prompt’ property instead. Prompt string for the parameter. Presented to the spreadsheet user along with input UI to collect the parameter value before refreshing the external data. Used only when parameterType = prompt.

getPrompt() : string;

setPrompt(string)

@deprecated. Please use the ‘prompt’ property instead. Prompt string for the parameter. Presented to the spreadsheet user along with input UI to collect the parameter value before refreshing the external data. Used only when parameterType = prompt.

setPrompt(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getType()

@deprecated. Please use the ’type’ property instead. Type of parameter used. If the parameterType=value, then the value from boolean, double, integer, or string will be used. In this case, it is expected that only one of {boolean, double, integer, or string} will be specified.

getType() : ConnectionParameterType;

Returns

ConnectionParameterType

setType(ConnectionParameterType)

@deprecated. Please use the ’type’ property instead. Type of parameter used. If the parameterType=value, then the value from boolean, double, integer, or string will be used. In this case, it is expected that only one of {boolean, double, integer, or string} will be specified.

setType(value: ConnectionParameterType) : void;

Parameters:

ParameterTypeDescription
valueConnectionParameterTypeThe value to set.

getName()

@deprecated. Please use the ’name’ property instead. The name of the parameter.

getName() : string;

setName(string)

@deprecated. Please use the ’name’ property instead. The name of the parameter.

setName(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getCellReference()

@deprecated. Please use the ‘cellReference’ property instead. Cell reference indicating which cell’s value to use for the query parameter. Used only when parameterType is cell.

getCellReference() : string;

setCellReference(string)

@deprecated. Please use the ‘cellReference’ property instead. Cell reference indicating which cell’s value to use for the query parameter. Used only when parameterType is cell.

setCellReference(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getValue()

@deprecated. Please use the ‘value’ property instead. Non-integer numeric value,Integer value,String value or Boolean value to use as the query parameter. Used only when parameterType is value.

getValue() : Object;

setValue(Object)

@deprecated. Please use the ‘value’ property instead. Non-integer numeric value,Integer value,String value or Boolean value to use as the query parameter. Used only when parameterType is value.

setValue(value: Object) : void;

Parameters:

ParameterTypeDescription
valueObjectThe value to set.

isNull()

Checks whether the implementation object is null.

isNull() : boolean;