Class DataSourceParameter
Stay organized with collections
Save and categorize content based on your preferences.
DataSourceParameter
Access existing data source parameters.
Only use this class with data that's connected to a database.
Detailed documentation
getName()
Gets the parameter name.
Return
String
— The parameter name.
getSourceCell()
Gets the source cell the parameter is valued based on, or null
if the parameter type is
not DataSourceParameterType.CELL
.
Return
String
— The source cell, as specified in A1 notation.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-12-03 UTC.
[null,null,["Last updated 2024-12-03 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eDataSourceParameter\u003c/code\u003e class allows access to existing data source parameters, but should only be used with data connected to a database.\u003c/p\u003e\n"],["\u003cp\u003eThis class provides methods to get the parameter name (\u003ccode\u003egetName()\u003c/code\u003e), the source cell (\u003ccode\u003egetSourceCell()\u003c/code\u003e), and the parameter type (\u003ccode\u003egetType()\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eIf the parameter type is not \u003ccode\u003eDataSourceParameterType.CELL\u003c/code\u003e, \u003ccode\u003egetSourceCell()\u003c/code\u003e will return \u003ccode\u003enull\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Class DataSourceParameter\n\nDataSourceParameter\n\nAccess existing data source parameters.\n\n\n**Only use this class with data that's connected to a database.** \n\n### Methods\n\n| Method | Return type | Brief description |\n|-------------------------------------|------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [getName()](#getName()) | `String` | Gets the parameter name. |\n| [getSourceCell()](#getSourceCell()) | `String` | Gets the source cell the parameter is valued based on, or `null` if the parameter type is not [DataSourceParameterType.CELL](/apps-script/reference/spreadsheet/data-source-parameter-type#CELL). |\n| [getType()](#getType()) | [DataSourceParameterType](/apps-script/reference/spreadsheet/data-source-parameter-type) | Gets the parameter type. |\n\nDetailed documentation\n----------------------\n\n### `get``Name()`\n\nGets the parameter name.\n\n#### Return\n\n\n`String` --- The parameter name.\n\n*** ** * ** ***\n\n### `get``Source``Cell()`\n\nGets the source cell the parameter is valued based on, or `null` if the parameter type is\nnot [DataSourceParameterType.CELL](/apps-script/reference/spreadsheet/data-source-parameter-type#CELL).\n\n#### Return\n\n\n`String` --- The source cell, as specified in A1 notation.\n\n*** ** * ** ***\n\n### `get``Type()`\n\nGets the parameter type.\n\n#### Return\n\n\n[DataSourceParameterType](/apps-script/reference/spreadsheet/data-source-parameter-type) --- The parameter type."]]