Selections

Selections are used to Select certain data from your Repository (database) Tables/Files/Objects to populate a DataSource. Selections are setup/created (named and any parameters to be passed into them are identified) against each Entity, which is linked to a Table/File/Object in the Data Mappings area.
In Data Mappings they are further defined with Filter and Sort clauses as shown opposite.
Each of the selections that have been set up in Entities is listed in the Selection column (see image right) with, initially, blank Filter and Sort clauses.
Sort Clause
The Sort Clause allows you to specify a specific sort order for the data retrieved by your Selection. Examples would be alphabetically by a name field retrieved or by descending (e.g. "DSNS" in Multivalue) by Date.
When a selection has been selected for update a "Build" button appears that offers the opportunity to select from a drop down list of the Properties (fields or columns) available for that Entity. This helps to eliminate typos when selecting a Sort Clause.

Filter Clause
The Filter Clause allows you to define the specific selection criteria, just as you would if you were selecting data directly from your SQL or MultiValue database when reviewing or interrogating your database another way. As a result the definitions vary between different databases. To help with this a build button is once again provided to assist with creating the selections.
SQL syntax
SQL Filters are the the select statement that would be executed when in your SQL database. Parameters passed into the selection from within Evoke are included by using the parameter name. You can use LIKE in order to select items that have a parameter in the selection and also options such as % which indicate that there could be characters before of after the value or parameter. The Filter Clause can include anything that you could type into an executed select statement that you would use on your database and will retrieve the same data as if it was executed that way.
SelectAll (selecting all items from a table or file) is a special selection and does not need a filter clause.
When used within your Evoke app the selection will be executed and will populate the DataSource with the resulting data that is returned

MultiValue syntax
MultiValue Filters are the the select statement that would be run in your MutliValue database when using a product such as mv.Net. Parameters passed into the selection from within Evoke are included by using the parameter name. You can use Visual Basic commands and functions such as ] to indicate that there are characters after the value being use. If you are using parameters passed into the selection then {parameter} around the parameter indicate the the value of the parameter should be used. MultiValue syntax also requires that " are used around constants and parameters (see example image right). The Filter Clause can include anything that you could type into a select statement that you would use on your database and will retrieve the same data as if it was executed that way.
SelectAll (selecting all items from a table or file) is a special selection and does not need a filter clause.
When used within your Evoke app the selection will be executed and will populate the DataSource with the resulting data that is returned
Filter Builder
The build button on the filter provides a much bigger space to enter the filter clause. the dropdown filter clause option allows you to select any property (field or column) from the Entity definition and add this to the clause, avoiding typos.
The accept and cancel buttons return to the summary screen for selections either updating the filter clause (accept) or returning without change (cancel).




Populating Related Data
Many data structures have "Related Data". Related Data can be other associated records linked via (in MultiValue databases) Local keys, remote keys, Embedded MultiValues, Embedded Subvalues, etc) or (in SQL databases) Joins or Link tables. When you populate a DataSource with a Selection (button, click action, page action, etc) then any Related Data, that you wish to access/use needs to be populated (read from the database) seperately. Please refer to the Retrieve Related Data section of Populating a DataSource.