.. _concepts-working-with-lists:

Working with Lists
--------------------

.. 20.1.1|VOSS-695|EKB-5200:


Ordering Lists
...............

The list view of items allows for basic ordering by column.

#. Click in the column header of a list. String columns are sorted
   alphabetically and numeric columns are sorted numerically.
#. Click the column header name or up/down arrow to change the direction or
   the sort order of the column.

The ordering of a column is shown by the up/down arrow.

.. note::

   * When sorting, instances with no value for the sort field will sort
     to the top or bottom of the list, depending on the alphabetical sort direction:
     ascending or descending.
   * Capital letters will sort *before* lower case letters.
   * With no filter applied, sort will work on any column in the list view.
   * With a filter applied to a single column, sort will work on the filtered
     column only.
   * With a filter applied to more than one column, the sort functionality will
     not work.
   * Leading spaces on a field in the list view are dropped when rendering the
     list view, so this may affect the sort order.
   * The sort order of the **Located At** column will be according to the
     displayed string value and not the hierarchy path.



Navigating Lists
..................

If a list contains multiple items, page navigation controls at the bottom, center
of the screen allow you to:

* scroll to the next/previous page using the right/left arrow respectively.
* scroll to the first or last page of the list as required.
* Go to a specific page by entering the required page number and clicking
  **Go** (or pressing **Enter**).  
* Specify the number of items to display on a page, 25 to 2000.
* If you are unsure of the total number of items in a particular list view,
  click the **Get total** button or on the last page, the **Update total** button. 
  
For drop-down lists containing more than 200 items, the bottom of the list shows
an item called "More choices" that can be selected to show the next items. 
A subsequent list will also have an item "Previous choices" at the top to navigate 
back through the list.  

.. note::
   Search result lists are limited to a maximum of 1,000 items.
   A message will show at the bottom of the list pages to indicate this.
   Use a more specific search query for result lists of more than 1,000 items. 
   






Filtering Lists
................

|VOSS-4-UC| Legacy Admin Portal allows you to filter lists in order to view only
data based on specific criteria. This includes Transactions and their Sub
Transaction and Log lists. For transactions, refer to :ref:`filtering_transactions`.

A **Filter** button is available next to the **Items/Page** drop-down at the bottom
of a list. A filter icon (with the same functionality) is also available next to
each column on which you can filter. This is only visible when you mouse hover on
the column headings. The **Filter** button on each page defaults to the first
column on the page, whereas the filter icon next to the column defaults to that
specific column. Click the button (or icon) to open the multi filter dialog. 

A filter instance consists of a selected column, a filter operator and a value.
Available filter operators are:

* Contains
* Does Not Contain
* Starts With
* Ends With
* Equals
* Not Equal

.. note::

   * The Contains filter operator and the **Ignore Case** check box = Selected,
     are applied by default. Add more filter fields as required.
   * The sorting of columns (ascending or descending) by clicking column headers
     while a filter is applied, is only supported for the Starts With operator.
   * To filter for rows with no value in a selected Column, choose any Filter Type
     option, select the **Ignore Case** check box and type ``None`` in the Value.
     This works for all list views except Subscriber
   * The **Located At** column will only filter on the actual hierarchy name
     and not the displayed text next to it, for example "site", "customer", and so on.
   * If access is available to specific models such as Configuration Templates and
     Macros, a filter will apply to *all* the instances in the hierarchy, since
     the listing of instances in these models is not restricted to a user's hierarchy. 

Filter instance rows can be added or removed on the dialog to create a filter. 
The combination of instances create a single filter where *all* instance rows 
are applied, in other words, in a logical AND.

String values are case sensitive, unless the **Ignore Case** check box is selected. 
All the filter operators apply to strings.

For Boolean values in a column, the filter is applied using any filter operators,
but only with values "True", "true", "False" or "false".

Number values in a column also use Equals and Not Equal filter operators. For
floating point values, at least one decimal digit is required for filtering, for
example ``2.0``. Filtering can be applied to values with decimal values up to
7 decimals. For example, consider a list of values:

::

 2.2000001
 2.0000001
 2.00000001

The filter: Not Equal to ``2.00000001`` displays only one value (``2.2000001``),
because the filter value has more than 7 decimals.

To apply the filter, press **Enter** or click the **Apply** button.  This will hide
the active filter dialog and show the filtered list. An **X** button shows next
to the active **Filter** button.

For model lists, actions can then for example be carried out on a selection of 
items from the filtered list. The filter remains active until it is removed or 
until the user session on the Legacy Admin Portal ends.

For all types of filters, the **Filter** button funnel icon is black when a filter
is active, and white when no filter is present.

A funnel icon also shows in the list header to indicate that a filter is active
and that the list is currently filtered. An **X** button shows next to the active
**Filter** button.

If a filter is active on a list, click the **Filter** button to display the multi
filter dialog again.  

Close an unapplied filter dialog by clicking outside it.
Unapplied filters are lost when the dialog is closed.

A filter remains active even when navigating away from the list. 
More than one filter can therefore be active on lists available in a session on
the Legacy Admin Portal.

Remove an active filter by clicking the **Remove** button on the multi filter
dialog or by clicking the **X** button next to the active **Filter** button.

.. important::
   Standard list view filters on model types
   will be removed and replaced by any Configurable Filters on landing page links
   or menu items for the corresponding model type when these are used. 
   See: :ref:`menus_landing_configurable_filters`.

A filter example is shown in the figure below.

|filter|



.. |filter| image:: /src/images/filter.png
.. |VOSS-4-UC| replace:: VOSS-4-UC
.. |Unified CM| replace:: Unified CM




Filtering Lists from the Filter Control
.........................................

From a list view, select the filter control to show a form to enter filter
conditions:

1. Select a field from the list view from **Select Field**.
#. Select a filter condition to apply to the field from the **Select Condition**.
#. Enter a value in the **Enter Filter Value**  as a value of the condition.

   You can choose to ignore the case of your filter value.
#. Choose **Add Filter Condition**. Filters are added below the input boxes.
#. When all filters are added, click **Filter**.

The list view displays the filtered list and the headers show:

* the number of result rows matching the filter
* the defined filter as a text link that can be opened to 
  modify the filter if needed
* the filter values in the filter header row of the selected fields columns