Select Pane

The Select pane combines a number of functions related to selection into a single pane.  The Select pane allows making selections using pre-built templates or free form expressions.  The Select pane operates on tables, drawings, labels, images, and those components as layers in maps.  Templates involving fields for drawings and images will take those fields from the source table.    Please read the Selection topic before proceeding with this topic.

 

The Select pane often groups many similar operations within a single template, allowing choice of the specific operation desired after launching the template.  For example, the Search template for text allows conditional comparisons such as equal (=), contains, starts with and similar.    Grouping operations that are similar or have similar parameters allows rapid application and reapplication of similar Search functions by changing a single condition or value, without having to repeatedly choose and re-choose parameters that have not changed.

 

The Select pane provides so many capabilities that more than one topic is required.   See also:

 

Select Pane Expressions

 

Select Templates

 

Tutorial Videos

See the video tutorials introducing the Select and Transform panes:

 

Select and Transform Part 1

 

Select and Transform Part 2

 

Index Required

As with any interactive selection capability, to use the Select pane the table must have at least one identity index in the table, such as the usual btree index on the mfd_id identity field. This is easy to add, if necessary, with one click in the Schema dialog. See the Add an Index to a Table topic.

Launch, Docking, and Undocking

Switch to the Select pane by clicking its tab if it is open, by choosing Select in the View - Panes menu to launch the pane, or by using the keyboard shortcut Ctrl+4.  

 

Shift-click the pane's name tab to undock the pane.   Shift-click the title bar to dock it again, or right-click the title bar and choose Dock.  An undocked pane can be resized and moved anywhere on our Windows desktop.   Close a docked pane by choosing its tab and then pressing the X button to close.  Close an undocked pane by right-clicking the title bar and choosing Close.  

 

We can dock the pane to the left and right of our Manifold desktop by right-clicking the name tab and choosing Dock Right or Dock Left.    We can dock the pane in an upper or lower row in our Manifold desktop, above or below other panes, by right-clicking the name tab and choosing Dock Up or Dock Down.   

Operates on the Active Window, Specified Layer

The pane automatically configures for whichever window has the focus when the pane is open.  Click a different window to move the focus to that window and the pane automatically adjusts.  

 

When working with an active window like a map that has more than one layer, choose the layer desired from the pull down list of components in the topmost box of the pane.  The layer picked in the pane can be different from whatever is the active layer in the map.

 

The Select pane opens to a top level list of pre-built commands, called templates, that may be used with the data type of the specified source field.  

 

Templates will automatically adapt to the data type of the specified source field.  The Filter box can be used to narrow down a long list of templates, or to find a template that does a particular operation.  The Filter box searches within templates for the names of operations within templates, as well as the top level names of templates.

Two Step Workflow

The Select pane uses two step workflow.  

 

Step 1: Pick a layer and a source field.  The pane then shows a list of templates that can be used with the data type of that source field.  Pick a template to launch it.

 

Step 2: The template opens with options for operations and parameters that work with the data type of the source field.  Without returning to Step 1, we can change parameters, choose a different layer in the map with fields of the same data type, or choose a different template that works on fields of the same data type.

 

Two step workflow ends up being faster than single step, because much workflow is iterative, doing the same thing to a different field, or making a slight change and applying the same operation.   After the initial step we can rapidly repeat the second step over and over, with easier recycling of settings.  For example, once we choose a numeric field in the first step we can very rapidly apply operation after operation to many different numeric fields in different layers, with most settings remaining the same, persisting into the next operation.  

Pick a Template

Double-click a template within the list to launch that template using the specified component and field.   We can also repeat-click a template, or focus on that template and press Enter, or focus on that template and press the Edit Parameters button.  That launches the template within the pane.

 

 

Templates often provide many operations that can be picked from a pull-down list, like the contains operation in action in the illustration above.   The pane will automatically configure to show options and parameter boxes that work with the chosen operation.  Templates will automatically adapt to the data type of the source field.  

 

To make selections using the Select pane:

 

  1. The Select pane applies to the active window.  Choose which component to use when the window has multiple layers.
  2. Choose a field within that component.  The pane will populate with templates that can be used with fields of that data type.
  3. Double-click the desired template.
  4. The pane will display parameters for whatever operation in that template is chosen.  Some templates have many operations.
  5. Choose the desired operation, and set parameters as desired in the option boxes that appear for that operation.
  6. Choose the Action desired if a mode other than replace selection is desired.
  7. Press the Select button.

 

 

Component

The name of the component the template is using.  Automatically set to the active window.  When the active window has more than one layer, we can choose the component desired from a pull down list in the box.     

Field

The field on which the template operates, also called the source field.  Choose any field from the active component.  When a drawing is the active component, the pane can operate using any field within the drawing's table.  Likewise, when a drawing's table is the active component, the pane can operate using the geometry field in that table, to select based on object geometry displayed in the drawing.

Filter

Reduce long lists of templates, and find which template hosts a desired operation by entering text to filter by.  The pane will only show templates that have in their names, or in the names of options they provide, the text entered into the filter box.  

Templates

Templates provide commands that can be done with the chosen type of field.  Templates often include many operations or options within them.   Operations that do similar things or use similar parameters are grouped together within a template, to allow parameter and option choices to persist as much as possible within repetitive or iterative workflow using similar operations. Double-click a template to launch it.

Recent

The ten most recently used templates together with their secondary operational choices appear as shortcuts, such as the contains option within the Search template for text.   Double-click a recently used item to launch it.  
 
The list of recently used templates persists within the same Manifold session even if we close the project and open a new project.  However, the list of recently used templates will disappear if we close Manifold and then launch a new Manifold session.

Pinned

Recently used shortcuts appear with a white pushpin.  Pinned shortcuts appear with a black pushpin at the top of the list.  Click a white pushpin to turn it black, and to pin that shortcut to the top of the template list. To unpin a shortcut, click the black pushpin to turn it white.   If the cursor is on a recent or pinned shortcut, the spacebar toggles the pushpin color.
 
Pinned shortcuts will persist at the top of the templates list for fields of that data type, even if we close and restart Manifold in a new session.   

(tooltips)

Hover the mouse cursor over a template to get a tooltip with a brief description of the template, usually providing some examples of operations it can do.

Cursor

Click a template to move the row cursor onto that template.  Move the cursor using the up and down arrow keys.  When we move the cursor onto a template, that puts the focus on that template.

Edit Parameters

Click to launch the template indicated by the cursor.

 

Picking a template launches it for use, with options and controls appearing as required for the data type of the chosen field and the operation desired.  The name of the template in use will appear at the top of the pane, with controls and parameter boxes appearing in the pane as required.

 

Typical Controls within a Template

Up one level.  Return to the main template list to allow choosing the component or field.  Use this button to choose a field that is a different data type from the current field.

<component name>

Gives the name of the component or layer that the template is using.   Change to any other layer in the same component that also has a field of the current data type.

Field

The subject/source field on which the template operates.   Choose any other field of the same data type.

Use

Choose an option of how to use the data.  For example, in text fields we can choose to either use the text (for text selection operations) or the number of characters in the text (for numeric selection operations).

Condition

Choose the comparative condition that will select desired records.  

Field, Value, or Expression

Choose the value to be compared to select desired records.   We can use values from a different field, literal values we enter, or values generated by an expression that is a snippet of SQL.

Trim

Choose end, none, start, or start and end.   Choices other than none will trim whitespace characters from the contents of the Field before applying the comparative condition.

Collation  

Used to set case or no case searches.  Press the collation picker button to choose a different collation, for example, neutral for case sensitive searches.   Various collations offer different languages and different settings, such as reckoning accents on characters or not.

Action

Specify how the selection made by the template will be combined with any existing selection:

 

  • replace Selection - Select all records chosen by the template and deselect all other records.   This operation takes whatever records would be selected by the template and makes those the only records selected, ignoring anything before.

  • add to Selection - Select all records that were previously selected plus in addition select all records that the template chooses.  Any records that were previously selected will, of course, remain selected.  If there was no prior selection, add to Selection is equivalent to replace Selection: in both cases the result is what the template would select.

  • intersect with Selection - Select only those records that were previously selected and which also are chosen by the template.   If there was no prior selection the result would be to select no records.

  • invert with Selection - An "anti-intersect" operation: everything except the intersection.  Select all records previously selected and all records which also are chosen by the template, except those records which were previously selected and also are chosen by the template.   This is equivalent to an add to Selection that simultaneously de-selects any intersect with Selection records.   If there was no prior selection the result of an invert with Selection is equivalent to both add to Selection and to replace Selection since in all three cases the result is what the template chooses.

  • subtract from Selection - De-select all records that are chosen by the template.  If there was no prior selection this is the same as selecting no records, that is Edit - Select None in the main menu.

 

Select

Do the selection, combining the selection with any previous selection as specified by the Action setting.

Preview

Show a preview in blue preview color of what the select operation will select.  A preview is just a temporary view and does not change the selection.

Edit Query

Pop open a Command Window loaded with an SQL query that accomplishes in an analogous SELECT query what this select template does given the current settings.  Note that the query will be an SQL SELECT statement that generates the same result set of records, and not a query that generates an interactive Manifold selection as is done by the Select pane, or by interactive mouse or keyboard selection.

Options within Templates

Select templates often can use different characteristics of the data in the subject field for select operations.

 

 

For example, the Search template when used with text data can do searches based on either the actual text or on the number of characters (the length) of the text.   While we usually think of selections using text as searching for specific character sequences or substrings, searching by the number of characters allows us to select only those text fields that are greater than a certain length, or less than a certain length and so on.   For example, if we plan on exporting a drawing to shapefiles, where a limit of 255 characters per text field may apply, we may want to find all text fields that have a number of characters greater than or equal to 255.

 

 

When we change the Use setting from text to number of characters, the options in the Condition list will also change, to match the change from selecting within text to selecting using a number.

Entering a Value

Wherever selection templates use a value box, we can choose a field, enter an explicit value, or an expression to specify the value.  When entering an explicit value the icon in the box will indicate what data type is expected, for example showing Ab for text values and 123 for numbers.

 

 

Suppose we use text and we choose contains as our Condition.   By default the Value box allows us to enter a literal text value (no need to enclose in quotes) such as durango.   If we prefer, we can switch the Value box to using a text field in the component, or the result of an expression.   Expressions are written as snippets of SQL that evaluate to a text value.  See additional discussion later in this topic.

 

 

In this case we enter durango into the Value box and then we press Select.   That selects all records where the Name field contains the text durango, case-insensitive, and that new selection will replace any previous selection.

Choosing a Different Template or Component

After doing a selection we can stay in the Search template to do another selection, perhaps choosing a different text field, or a different operation or different values, or we can press the Up button to go up one level to choose a different template, a different layer in the same component, or a different data type field.

 

 

If we go up one level, we see the selection we just made using contains has appeared in the template list as a recently used template.  Double-clicking that recently used item immediately jumps us into the Search template set to use contains.  

Persistent Choices and Context

The Select pane remembers prior choices.   We can change the Field used to any field of the same data type in the chosen component.   To change types or components click the up arrow button to move back to the top level.

 

The Select pane also remembers context.   If we have been using Search with a map window, we can click open a table window (leaving the map window open) and do a different selection operation with that table window.  When we click on the map window to make it the active window again, the Select pane will be loaded with Search exactly as we left it.

 

Select templates that recently have been used automatically (for the last ten templates) get added to the list of available templates for a given data type.  Pin a recently used template to the list by clicking the white pushpin icon to turn it dark.  Pinned templates appear at the top of the list and will remain in the list even after Manifold is closed and relaunched in a new session.  Unpin a pinned template by clicking the dark pushpin icon to make it white.

Pinning Favorites

If we frequently use a particular template, after any use when it appears in the frequently used list, we can click the white pushpin icon to make it a dark pushpin, thus pinning the template as a favorite to always appear in the templates list.  Pinned templates always appear at the top of the templates list.  To unpin a template, click the dark pushpin icon to make it a white icon again.

Filter Box

Templates can contain lots of functionality.  The Search template, for example, between options for numbers and for text provides over twenty different selection operations.   If we cannot remember which template hosts contains we could enter the text contain into the filter box to reduce the template list to only those templates that have that text (case insensitive) in their top level names or within any secondary options.   

 

 

The box filters templates based on searches down into operational choices within templates.   Entering contain thus filters the template list not only to the recently used template that has contains in the shortcut, but also includes the Search template in the filtered list, since that template has the word contains within the available list of conditions for text selections.

 

To facilitate easy use of the filter box, template options will often include alternate names, abbreviations, or functional terms within ( ) parentheses, which are also checked by the filter box.  For example, entering just an = sign in the box will filter to the Search template, which contains equal (=) functionality.

Action Mode

The mode selected in the Action box specifies how the selection created should be combined with any existing selection.  By default the Action mode is replace selection.  

 

 

The pull-down menu allows us to choose other selection modes.  See the discussion below for more detailed information on selection modes in the Action box.

Example

 

Consider the drawing above, which shows building footprints in Monaco as polygonal areas.  We have Alt-clicked one of the objects to see in the Info pane Values tab that the name field for that object contains the text Monte Carlo Star.    We will use that information in the workflow below using the Select pane.

 

 

We choose the Select pane and then for the field we choose name.  We double-click the Search template.  Note that working in the Select pane does not alter the picked status of the Monte Carlo Star polygon.

 

 

Within the Search template, in the Use box we choose contains.

 

 

We enter Star in the Value box.  There is no need to put single quotes around Star, since the template expects text as a value.    Since the default Collation has nocase set, we could use star, with everything in lower case, or any combination of upper and lower case we wanted, and still get the same result.

 

Press Select.   Selected objects will appear in the active window in red selection color.

 

Because the Action button is set to replace selection, the selection we have made will replace any previous selection.  Given what we learned from the Info pane at the start of this example, we know that at least the Monte Carlo Star building will be selected.      

 

In addition to being picked, the Monte Carlo Star building now also is selected.  

Example

We use a drawing that shows provinces in Mexico as polygonal areas.   The drawing we open is in the same project as the Monaco building footprints drawing used in the prior example, so the Select template will remember prior settings as much as possible.

 

 

The table for this drawing has attributes with data for each province, including a field called Name that gives the name of each province.  

 

With the focus on the opened Mexico drawing, choose the Select pane.  

 

 

We choose the Name field as the source field.  Since the Select pane remembers recently used templates based on the data type of the field we choose, it shows the use of the Search template using contains from our prior example.    We double-click that recently used template.  We could have double-clicked the Search template if we preferred.

 

 

Choosing the recently used template sets everything up for us as before, so all we need to is enter Durango in the Value box.   There is no need to put quotes around the Durango string, since the Value box expects a literal text value.   Since the default Collation has nocase set, we could use durango, with everything in lower case, or any combination of upper and lower case we wanted, and still get the same result.

 

Press Select to make the selection.   The province of Durango is selected in the drawing, and is shown in red selection color.

Open the Drawing's Table

We open the drawing's table, Mexico Table.

 

 

Since selections are shared between every component that depends upon the same table, the table already has the Durango record selected.    With the focus on the table window the Select pane automatically switches context to operating on that table window.  

 

 

We choose Name as the source field, and once again we see a recently used row for the Search template using contains from our prior example.    We want to search using different criteria, so we double-click the Search template.

 

 

In the Use box we choose starts with and then we enter the capital letter S in the Value box.  As before, there is no need to bracket the S text with quotes.    This will select all records where the Name value begins with an S.  We have chosen a neutral, nocase collation, so the template is not case sensitive. If we wanted to search only for a capital letter S at the beginning of the name, we could have change the collation to a neutral collation.  

 

We change the Action setting to add to selection, so whatever selection is made will be added to the existing selection, instead of replacing it.   

 

Press Select.

 

Right away, records with names that begin with the letter S, either upper case or lower case, are added to the selection, joining the previously selected Durango record.   All selected records are shown in red selection color.

 

 

The areas corresponding to those selected records are also selected in the drawing, and also shown in red selection color.

 

See the Labels topic for a similar example using labels and the Select pane.

Choosing Fields, Values, or Expressions

The parameter boxes for templates in the Select pane usually allow a variety of ways to choose the data they use.  They usually allow choice of a field, taking the value from whatever is in the specified field, specification of a literal Value, or entry of an SQL Expression.

 

 

In the illustrations below we will use the table above, which has numeric fields giving the number of households, automobiles, buses and trucks for provinces in Mexico.   We will use a typical Select template, the less (<) choice in the Search template, to make selections comparing other numbers to the number of automobiles in each province.

 

Choose a field

Clicking on the icon for the Value box pulls down a menu offering a typical selection of choices.  We are making comparisons to the Automobiles field, a numeric field, so the pull down menu shows all of the numeric fields, that is, those fields which can be used as a direct comparison to another numeric field using the less (<) template).  

 

The pull down menu also allows choice of Value or Expression.   We choose the Trucks field that is in the table.

Choosing the Trucks field means that we will select all records, that is, all provinces, where there are fewer automobiles than trucks.  

 

Enter a literal Value

If we want to specify a literal, specific text value to compare against the values for each record in the Automobiles field, we choose Value in the pull down menu.    The small 123 icon indicates it is a numeric literal.  The icon for Value depends on the parameter type, for example, a small Ab icon indicating a text literal and a small 123 icon indicating a numeric literal value.

In the Value box we can then enter a literal value, in the illustration above, entering the number 400000.  The result will be selecting all provinces where the number of automobiles is less than 400000.

Enter an SQL Expression

We can specify the value using a SQL expression.  Choose Expression in the pull down menu to tell the template we will use an SQL expression.  The result of the expression must be the same data type as the source field.

 

Suppose we want to find all provinces where the number of automobiles is less than the sum of buses and trucks.  

 

We choose Expression and that launches the expression builder dialog.   We enter the expression

 

[Buses]+[Trucks]

 

and then press OK in the expression builder dialog.   The new expression appears in the Value box.

The expression we have built appears in the Value box.   The result will select all provinces where the number of automobiles is less than the sum of the number of buses and trucks.

 

Many templates open a Value combo box that allows us to specify the name of a field in the table with which the template works.   The Non-null Values and Null Values templates open only the Value combo box while other templates will open additional combo boxes to specify other parameters the template requires.

 

Consider a table called Products adapted from the ubiquitous nwind sample database.

 

 

With the focus on the Products table window, in the Select pane we choose Stock as the source field.   We double-click the Search template.

 

 

We choose equal (=) as the Condition and the Units On Order field as the Value.   Press Select, and all records where the Units on Order value is equal to the Stock value are selected.

 

 

We can enter numbers into the combo boxes as well.  If we want to select all records where the Stock field is 15 we choose Value from the pull down menu for the Value box and enter the number 15 into the Value box.   Press Select to select all records where the Stock is equal to 15.

 

 

Many templates provide both Value and Expression choices for parameter boxes in addition to a choice of fields.  Expressions are written using SQL syntax.   For example, in the above we find all records with Units On Order values that are Greater than Stock * 3.   We do not need square brackets around the Stock field because it has no spaces in the field name, but we use them anyway because getting in the habit of using brackets provides a consistent look and avoids forgetting brackets when writing expressions using field names with spaces.

 

 

We can enter text strings into the combo boxes when the source field is a text field.  In the illustrations above, we have used the Up button to move up one level in the Select pane so we can choose a different data type field, the Name field, as the target.   The Name field is a text field.

Previews in Table Windows

With the focus on a table window, pressing the Preview button in the Select pane shows a preview of what records will be selected by overlaying blue preview color on all records that will be selected.   A blue selection virtual column header appears, with the caption of the column header set to the Select template used.

 

Suppose in the example table used above we use the Search template to search for values in the Stock field that are greater (>) than 50, with  Round set to none.  Pressing Preview launches a preview of what will be selected if we press the Select button.

 

 

Blue preview color overlays all records that will be selected by the new operation and a blue virtual column header (just the column header, with no column below it) captioned Search appears in the column headers section at the top of the table.  To hide the preview, right-click the Search virtual column header and choose Hide Preview.

 

Records that will be selected, that is, those with Stock greater than 50, are shown in blue preview background color.  Rows that were already selected, and which also will be selected by the new operation, are shown in a blend of their former red selection color and the blue preview color, a violet color.

 

Records that will not  be selected by the new operation do not have any blue color overlaid.   If they were not previously selected they remain white.  If they were previously selected they remain red.

 

Summary of colors used by previews:

 

 

Press Select to make the selection.

 

 

Pressing Select makes the selection and clears the Preview.  

 

The virtual column header lets us know a preview is in action, which is useful if no records that the preview would select appear in the table window.  

 

For example, suppose we select using the Search template for all records where the Stock value is greater (>) than 300, and we press Preview.

 

 

The blue preview column header captioned Search appears in the column header section at the top of the table.  That tells us a preview is in action, and right away we can tell the lack of blue rows in the table window is not  because we didn't press the Preview button, but because the preview shows none of the records in view would be selected.

 

If we would like to move the virtual column header we can drag it to a different location, or we can resize it by dragging the borders.

 

 

For example, we can drag the left border of the Search virtual column header to the right.

 

 

That will make narrower, if our table window is small.  In most cases, table windows will be wide enough that a virtual preview column header appearing in the upper right part of the table will not be an issue.

Hiding Previews

To hide the preview, right-click the virtual column header and choose Hide Preview.

 

 

In the illustration above we have right-clicked on the Search virtual header.  In the context menu that appears we choose Hide Preview.

 

 

That turns off the preview.  

Preview Computations are Dynamic

Manually editing records that are used in a preview computation will automatically update the preview column.    Consider the example below, where the preview column shows the result of selecting for records where the Stock value is greater than 50.

 

 

The Stock value for the Bean Curd product is 35.   We double-click into that cell to change the value to 55.

 

 

As soon as we commit the edit and the value 55 appears in the cell, the preview will immediately update to show that row in blue preview color.

 

Changes made to tables by other processes, for example, by running an SQL query that makes changes to the table data, will not update the preview.  We can close the preview and launch it again to refresh it.

Previews Persist

When we press the Preview button to command a preview, that preview will continue to appear in the table window even if we change the focus to a different window.   We can have multiple previews running in multiple different windows.   

 

Changes in the Select pane such as changing values or the operation used will not close the preview, but they will not update it.   To update the preview in such settings, press the Preview button again.

 

The ability to do other work without losing the preview can be very useful.

 

 

For example, we might use the preview as a guide to editing fields, or to manually change the selection, such as by Ctrl-clicking one of the previewed rows to select that record.

 

 

The new record will be shown in combined red + blue color.

 

 

If we hide the preview the record is still selected.

Select Pane Previews / Transform Pane Previews

The Transform pane also does previews, using blue preview color just like the Select pane previews do.  We can show either a Select pane preview or a Transform pane preview, but not both at the same time: Select pane and Transform pane previews will override each other.

 

If we show a preview in a window using the Select pane and then we switch to the Transform pane and press the Preview button in the Transform pane, the Transform preview will appear and the Select pane preview will be hidden.  If we then press the Preview button in the Select pane, the Select preview will appear and the Transform pane preview will be hidden.   

 

Going back and forth between pressing Preview in the Select and Transform panes will alternate between Select and Transform previews. Whichever pane commands a preview last will win, showing its preview.  

Entering Values

Using the contains operation within the Search template, if we want to select all records where the Name field contains the string Anton, we choose Value in the pull down menu for the Value box and then enter Anton into the Value box.  If we use a literal Value with the contains operator, we do not need to use single quote characters around the string, because that operator is expecting a text value.  In contrast, if we used an Expression, which uses SQL syntax, we would have to bracket the text string is within single quote ' characters to use a literal.

 

Text operators such as contains, ends with and starts with are all fully international versions that use whatever collation is specified in the Collation setting.  Although the Collation setting is most often used with the built in favorites of neutral, nocase (case insensitive) or  neutral (case sensitive), other collations allow us to have options such as Ignore accent and Ignore symbols.   Those options can be very useful in languages where sometimes accents and symbols are used and sometimes are not used.   

 

It is very common in French to encounter place names which in their official forms may use accents but which in technical uses such as databases do not.  The town of Vendôme in the Loir-et-Cher department of France, for example, is properly spelled with a circumflex accent (the small chevron mark) over the letter o. Nonetheless the name of the town is frequently spelled Vendome without a circumflex accent on web sites and in numerous address databases and other usages, both in France as well as internationally.   To select both Vendôme and Vendome we would check the Ignore accent box for templates that offer it.

Like and Regular Expressions

The matches pattern (like) operator in the Search template allows entering a literal string that is a pattern expected by the LIKE operator in SQL.  The matches regular expression operator in the Search template allows entering a literal string that is a regular expression pattern to be matched.    

 

Important: When using the matches regular expression operator we enter a regular expression as a string into the Pattern box, with any backslash \  characters within the regular expression escaped by a backslash character prefix for each, as in \\.   See the discussion and examples in the Regular Expressions topic.

Action Mode

The mode selected in the Action box specifies how the selection created should be combined with any existing selection when we press the Select button.  By default the Action mode is replace selection.  

 

 

The pull-down menu allows us to choose other selection modes.    The available selection modes available are listed below with a Venn diagram showing how the different command button modes operate.

 

Action mode ignored - Queries generated by the Edit Query button in the Select pane ignore the select mode specified by the Command button.    See the Note below.

 

In the Venn diagrams the left-hand circle represents the existing selection in the table and a second, overlapping circle represents the selection that the Select pane would make.  Just as for selections in windows, the existing selection circle is shown in red selection color.  The selection the pane would make is shown in blue preview color. The overlap, that is, those records that are both in the existing selection and which are also are in the preview are shown in blended color that combines the red selection color with blue preview color.  The final result of pressing the Select button in the given mode is shown entirely in red selection color.

 

replace selection -  Select all records chosen by the template and deselect all other records.   This operation takes whatever records would be selected by the template and makes those the only records selected, ignoring anything before.

 

 

add to selection -  Select all records that were previously selected plus in addition select all records that the template chooses.  Any records that were previously selected will, of course, remain selected.  If there was no prior selection, add to selection is equivalent to replace selection: in both cases the result is what the template would select.

 

intersect with selection - Select only those records that were previously selected and which also are chosen by the template.   If there was no prior selection the result would be to select no records.

 

invert with selection -  An "anti-intersect" operation: everything except the intersection.  Select all records previously selected and all records which also are chosen by the template, except those records which were previously selected and also are chosen by the template.   This is equivalent to an add to selection that simultaneously de-selects any intersect with selection records.   If there was no prior selection the result of an invert with selection is equivalent to both add to selection and to replace selection since in all three cases the result is what the template chooses.

 

subtract from selection - De-select all records that are chosen by the template.  

 

Note that since other commands remain fully operational when the Select pane is open we can still use menu commands such as Edit - Select All, Edit - Select None and Edit - Select Inverse.  We can use mouse selection methods as well.   Between those commands and the rich set of selection capabilities provided by the Select pane, interactively we can make exactly the selection we want.

Dynamic Updating

The Select pane dynamically updates itself given any changes in the table's schema.  For example, if we choose Edit - Schema and then add a new text field to the table the available fields in the Expression tab's expression builder will be updated with the new field and the new text field will also appear in the pull down menu of field options for Value boxes.   

 

If we delete all btree indexes from the table the Select pane will automatically be disabled, since it cannot work with tables that do not have at least one btree index.

Simultaneous Use of Other Facilities

When we have the focus on an open window the Select pane works with that particular window.  At the same time we can open other windows and do other work with Manifold, going back and forth between the other work and the Select pane.  The Select pane will automatically switch context to apply to whatever open window has the focus.   

 

The Select pane is reasonably good at remembering what we were doing.  Suppose with the focus on a drawing we choose a text field, the Search template, and the contains operator, entering a text string to search for in the Value box.  Suppose now we pop open some other table to double-check the string for which we want to search.   When we have the focus on that other table window, the Select pane will arrange itself to suit the focus on the new window, but when we click back on the drawing window the Select pane will automatically restore itself to what we were doing with the context on the drawing window.  Super!

Selection Colors

Selection color by default is red: records in tables with a light red background or objects in drawings rendered in red are selected.

 

Preview color by default is blue. The Select pane will preview what records would be selected if the current expression is used by showing those records with blue background.   In drawing windows, objects in the process of being edited or which are in some sort of not-yet-committed selection process are also previewed in blue preview color.

 

Selections in tables will often encounter a situation where some records have already been selected in red color but in addition some records are being previewed in blue color as part of a selection process underway.     In cases where the same record is already selected in red color but also the system wants to show that it would be selected by the process underway by rendering it in blue, the resulting color is a blend of red and blue.   

 

This effect might be confusing when a table is first seen with a mix of records shown in red, blue, blended violet and white backgrounds. New users might look at that blended color and think "Hmm... looks blue to me..." but the more experienced user will rapidly learn to recognize it as a blend between red and blue that indicates a selected record which also is being previewed.  The blended color instantly indicates the intersection of the existing selection and what the previewed action would select.

 

That is also an effect to keep in mind right after we apply a selection action in the Select pane, when just after we apply the command, say, by pressing the Select button with the Action mode set to  replace selection: instead of seeing the previewed records in the table turn from blue to red they all appear in blended color.  What is going on is that until we move on in our workflow since the Select pane is still set to whatever action that made that selection it is still previewing the effect of that action in blue.  When we apply that action to select those records they immediately become both selected and also will still be previewed, resulting in the blended color.   The moment we move on to doing something else in the Select pane, say, by changing the expression or by clicking on a different template or tab, the blue color preview overlay, if any, will change or go away and we will see the selected records  in red selection color.

 

The above color effects merit close attention by new users: experienced users rely on them as essential visual cues while beginners who do not learn the basics often find them confusing. If we spend a few minutes getting our heads around what colors convey we can use those visual cues for rapid, error-free and effective selections, especially when combining selections.

Dynamic Updates

The Select and Transform panes automatically update themselves after changes to components. For example, if we open a table, then open the Select pane and pick a template, then add a new field to the table, the pane will adjust and start offering the new field in lists for parameter values.

 

If we pick the field for use as a parameter value and then delete it from the table, the pane will adjust again and switch the parameter value referencing the now deleted field to use a constant value or a different field, depending on the parameter.

 

If we open a map and start adding or removing layers, the panes will automatically adjust to all changes.  Changing the active layer in a map has no effect on the panes, and adding a new layer has a minimal effect:  the new layer becomes available for use but the picked layer does not switch to the new layer.  Deleting a layer only has an effect if that layer was the layer picked in the pane.

 

If the Transform selection only box is checked in the Transform pane, we can dynamically select or unselect items in the subject window and the Transform template will be dynamically applied to the selection as it is.   For an example of that effect, see the Labels topic.

Simultaneous Use of Other Facilities

When we have the focus on an open  window and we open the Select pane or the Transform pane, that pane applies to the window that has the focus.  We can open other windows and do other work with Manifold, going back and forth between the other work and the Select and Transform panes and the panes will automatically adapt. 

Context Saved

Switching between component windows automatically saves and restores the state of the Select and Transform panes for each window. For example, we can open a drawing, start preparing a transform, decide to take a look at the records in a different table, open that table in a new window, and then when we return to the drawing, the Transform pane will be in the exact same state as we left it. We can have several alternative transforms or selects being prepared for different windows and switch between them freely.

 

Performing a select or transform does not clear the relevant pane: the pane remains in the same state where the operation can be repeated with or without modifications.

Time Readout

Since many operations complete nearly immediately, after clicking the Select or Transform button, we might wonder if we clicked the button.  To show that we did indeed click the button and that the operation has already finished, the pane shows the time it took for the operation to complete next to the clicked button.  After 10 seconds, the time readout disappears, ready to appear with a new readout the next time we click the button.

 

The pane also logs the time for each operation into the Log window.  The log message includes the names of the used layer and field, the name of the template, and the values of key parameters.

Notes

Select mode ignored - Queries generated by the Edit Query button in the Select pane ignore the select mode specified by the Command button.  The purpose of the query generated by the Edit Query in the Select pane is to show what the system does to apply a specific template and to produce a reasonable starting point for customizing the query further when writing an SQL query.

 

Videos

Select and Transform Part 1

 

Select and Transform Part 2

 

See Also

Select Pane

 

Select Pane Expressions

 

Select Templates

 

Tables

 

Selection

 

Drawings

 

Example: Using Select Pane Templates - A sequence of actions using Select pane templates.

 

Example: Using Select Pane Expressions - Make selections by writing snippets of SQL into the Select pane Expression template.

 

Example: Construct JSON String using Select and Transform - Use the  Select and Transform panes to manually construct a JSON string using values from other fields in a table. Shows how we can manipulate text to build desired contents in a field.