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.
CGETSQL (EditableTable, Key, ColumnName, DefaultValue, IsEditable, LookupFilter)
Specify the Editable Table ID or Name to use as the base definition.
Specify the key value from the table that this formula should use to get the data.
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.
Specify the default value to use when a new record is created against this Editable Table.
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.
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
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).