Skip to content

CGETSQL

The CGETSQL formula is used to retrieve a value from a CALUMO Editable Table based on the key and field name passed in as part of the function.

Syntax

CGETSQL (EditableTable, Key, ColumnName, DefaultValue, IsEditable, LookupFilter)

Arguments

EditableTable : string (required)

Specify the Editable Table ID or Name to use as the base definition.

Key : string (required)

Specify the key value from the table that this formula should use to get the data.

ColumnName : string (required)

Specify the column/field name or the defined alias from the Editable Table for which to display the data from the record of the specified key.

DefaultValue : string

Specify the default value to use when a new record is created against this Editable Table.

IsEditable : boolean

Specify if this cell is editable or not. This argument is ignored (ie does not override) if the column is set to not updatable in the Editable Table definition.

Default value: true

LookupFilter : string

Lookup filter provides the ability to set a restriction on the values that are available for the user to select from the drop-down list.

Lookup filter is only applicable when:

  • The field referenced is set as type ‘Lookup’ in the referenced Editable Table
  • The ‘Lookup’ definition is set have Server Filtering enabled

Note

You will need to wrap your lookup filter in round brackets ( )

On the CALUMO server, when the lookup filter is applied, it modifies the query being executed by appending its value to the WHERE clause (with an AND if there are other parts to the WHERE clause, e.g from the Editable Table definition).

Usage Scenarios

This formula is used as a part of building an input form along with formula such as CREPORTSQLSELECTOR and CREPORTSQLPAGER

Back to top