Comment on page
Select and query specific records
select ... where
selectlets you access any record of any table within a database using a script. Enter the name of the table from which you want to pull records after the
Insert the following script in the options of an embedded table view under Formula to display all the records of the Customers (New) table.
select 'Customers (New)';
Result: All records of the Customers (new) table are displayed in an embedded table.
To avoid displaying all records of a table, limit the selection with
select ... where. Then only the records are displayed which fulfill the condition after
In the Customers table, a choice field Headquarter is available, in which the IDs of the choice values are assigned as
and you'd like to display only the DACH region, i.e., Germany, Austria, and Switzerland.
select 'Customers (new)' where 'Headquarter' = 1 or 'Headquarter' = 2 or 'Headquarter' = 3;
Result: In an embedded table the records of the table Customers (new) are displayed, which have their company headquarters in
In case you use special characters in a field or table name, e.g., white space, hyphen, underscore etc., put the name between 2 single quotes (
You may further filter already selected records, i.e., an array of type [
nid], by specifying the condition to filter by in brackets
[...]after the array.
let customers := select 'Customers (New)';
In contrast to
select ... where, all records are selected first and then filtered. With
select ... whereonly the records that meet the conditions are selected.
Given the amount of data that needs to be processed and the related processing time (performance), we recommend using
...wheresince it's faster.