TinyBase logoTinyBase β

GetTableCell

The GetTableCell type describes a function that takes a Id and returns the Cell value for a particular Row, optionally in a joined Table.

When called with one parameter, this function will return the value of the specified Cell from the query's root Table for the Row being selected or filtered.

(cellId: string): CellOrUndefined
TypeDescription
cellIdstring

The Id of the Cell to fetch the value for.

returnsCellOrUndefined

A Cell value or undefined.

Since

v2.0.0


When called with two parameters, this function will return the value of the specified Cell from a Table that has been joined in the query, for the Row being selected or filtered.

(
  joinedTableId: string,
  joinedCellId: string,
): CellOrUndefined
TypeDescription
joinedTableIdstring

The Id of the Table to fetch the value from. If the underlying Table was joined 'as' a different Id, that should instead be used.

joinedCellIdstring

The Id of the Cell to fetch the value for.

returnsCellOrUndefined

A Cell value or undefined.

Since

v2.0.0


Calling this function with three parameters (where the first is true) will return the value of the specified Cell from a query result that has been joined in the query, for the Row being selected or filtered.

(
  asQuery: true,
  joinedQueryId: string,
  joinedCellId: string,
): CellOrUndefined
TypeDescription
asQuerytrue

A flag indicating that the next Id is a query Id.

joinedQueryIdstring

The Id of the query result to fetch the value from. If the underlying query result was joined 'as' a different Id, that should instead be used.

joinedCellIdstring

The Id of the Cell to fetch the value for.

returnsCellOrUndefined

A Cell value or undefined.

Since

v8.3.0

A GetTableCell can be provided when setting query definitions, specifically in the Select and Where clauses when you want to create or filter on calculated values. See those methods for specific examples.

Since

v2.0.0