Get a Table Instance
A table reference can be created by referring to the predefined data store reference by passing either the tableID or table name as the parameter. The datastore_service reference used in the below code snippet is the component instance created earlier.
Get the Table Instance using TableID
The table_service reference can be created by passing the tableID as a parameter to the table() method. To know more about the component instance datastore_service used below, please refer to this help section.
Parameters Used
Parameter Name | Data Type | Definition |
---|---|---|
tableID | String | A Mandatory parameter. Will hold the ID of the table. |
copy
#Get table instance using table ID
datastore_service = app.datastore()
table_service = datastore_service.table(5249000000011745)
Get the Table Instance using Table Name
Alternatively, a table reference can be created by referring the tablename in the table() method. There is no explicit response involved in these methods and only the instance of the table is returned.
To know more about the component instance datastore_service used below, please refer to this help section.
Parameters Used
Parameter Name | Data Type | Definition |
---|---|---|
table_name | String | A Mandatory parameter. Will hold the name of the table. |
copy
#Get table instance using table name
datastore_service = app.datastore()
table_service = datastore_service.table("CITY")
Last Updated 2025-03-28 18:24:49 +0530 +0530
Yes
No
Send your feedback to us