The Datably Table stack represents a table in the database as well as on the web page. This stack provides access to the table data as well as powerful formatting features.
You can have as many tables per Database Stack as you like.
Column Selection & Filters
Datably provides several ways to influence the result set:
- Full unfiltered
- Via URL Query Strings
- Fixed Column selection and Filters (set inside the Stack)
Option Closed (+ Sign visible) - no default column selection or filter is applied. It is possible to provide column selections and filters through URL Query Strings (a.k.a. GET Parameters). The Query String is set up exactly as explained below. Example with column selection:
?include=lastname,firstname,number&filter=lastname,eq,smith
Example with filter only:
?filter=lastname,eq,smith
Option Open (- Sign visible) - fixed (default) column selections and filters are applied via the controls which are enabled now. Functionality see below.
Filters provide search functionality, on list calls, using the "filter" parameter. You need to specify the column name, a comma, the match type, another commma and the value you want to filter on. These are supported match types:
- "cs": contain string (string contains value)
- "sw": start with (string starts with value)
- "ew": end with (string end with value)
- "eq": equal (string or number matches exactly)
- "lt": lower than (number is lower than value)
- "le": lower or equal (number is lower than or equal to value)
- "ge": greater or equal (number is higher than or equal to value)
- "gt": greater than (number is higher than value)
- "bt": between (number is between two comma separated values)
- "in": in (number or string is in comma separated list of values)
- "is": is null (field contains "NULL" value)
You can negate all filters by prepending a "n" character, so that "eq" becomes "neq".
Filters can be a by applied by repeating the "filter" parameter in the filter string, for example:
filter=id,gt,1&filter=id,lt,3
This will request all records "where id > 1 and id < 3". If you wanted "where id = 2 or id = 4" you should write:
filter1=id,eq,2&filter2=id,eq,4
As you see we added a number to the "filter" parameter to indicate that "OR" instead of "AND" should be applied. Note that you can also repeat "filter1" and create an "AND" within an "OR". Since you can also go one level deeper by adding a letter (a-f) you can create almost any reasonably complex condition tree.
The modal window is used to enter new and edit existing records. In this section you can set the most important options.
Add a button of your choice to the "Submit Button" drop-zone. Do not configure any target or action for the button!