.. _concepts-working-with-lists:

Working with lists
--------------------

.. 20.1.1|VOSS-695|EKB-5200:
.. _21.3-PB2|EKB-11638:
.. _24.1|EKB-19493:
.. _24.2|EKB-20390:
.. _24.2|EKB-22378:


Overview 
..........

Summary views of resources and services are shown in lists in the Automate Admin Portal. For 
example, you can view a list of components in your system hierarchies, or to view a list of 
customers, sites, users, subscribers, servers, or device types. 

The lists include functionality that allows you to sort, order, and filter items, 
and to navigate across multiple pages.   

.. image:: /src/images/list-example.png


.. rubric:: Related Topics 

* :ref:`introduction-to-the-admin-gui`


Get total
..........

A **Get Total** link is available at the top of list and filtered views
to show the total number of rows in a list in the case where
there are more than the default 200 rows shown on a page.
Pagination controls will then be adjusted accordingly.

The purpose of this control is to speed up the initial
display of long lists.


Refresh lists 
.................

The Automate toolbar **Refresh** icon |refresh| allows you to refresh the list view any time, for example, you may want to 
reload list items once a transaction completes related to the items you're viewing on a list. 

.. note:: 

   If you have a filter applied to the list, refreshing the list displays the new item if it matches any 
   applied filters. In the scenario described above, if you have a filter applied to only show 
   phones containing the characters *123*, the refreshed list view will show any new phones containing these 
   characters. 


Reorder columns 
..................

Automate allows you to select and drag a column to a new position in the list view, to 
rearrange the order of the columns. The updated column order is retained for you 
in your browser's local storage, until that storage is cleared. 


.. image:: /src/images/reorder-columns.png 



Sort and order lists 
.....................

Columns in the list views may contain string values or numeric values. The default 
sort order is on the first column, either alphabetically (descending) for string value 
columns, or numerically (descending) for numeric value columns. 

To sort the list based on values in a column, click on any column header. Click again to change the 
direction of the sort order. An up/down arrow in the column header indicates the sort order. 

When sorting: 

* Cells with no value move to the top or bottom of the list, depending on the 
  sort order (ascending or descending). 
* Upper case letters letters sort before lower case letters.
* Any column can be sorted, provided no filter is applied. 
* Applying a filter to two or more columns disables sort.
* Leading spaces in field values are dropped from the list view. This may affect the 
  sort order. 
* Values in the **Located At** column are sorted according to the string value, and not the hierarchy path. 




Navigate lists
..................

Lists with many items may display across two or more pages.

* To navigate across a multiple page list, click the right/left arrow to scroll to the next/previous page, 
  or click a page number.

  .. image:: /src/images/list-navigation-2.png

* To view more items per page, specify the number of items to display on each page, from 25 to 2000. 
  This includes lists of transactions, logs and sub-transactions.

  .. image:: /src/images/list-navigation-1.png

* The header row displays the number of the rows you're viewing out of the total.

  .. image:: /src/images/list-row-numbers.png 


.. note::
   
   Search results that display as lists return a maximum of 1,000 items.
   A system message at the bottom of the list indicates this limitation. Change the search 
   criteria for result lists exceeding 1000 items.  
   





Filter lists
................

This topic describes filtering on resource and service summary lists. For details around 
filtering transactions, sub-transactions, and log lists, see :ref:`filtering-transactions`.

A filter remains active until you remove it or until your user session ends (even if you 
navigate away from the page). If you're not seeing all data on a list, clear the filter by 
clicking the X icon adjacent to the **Filter** button, or open the dialog and remove filters. 

.. note:: 

   In the Admin Portal, when opening a list via a menu, and you create and apply a filter to this list, 
   the filter is not retained for this list when you open the same list from a dashboard. The filter is 
   retained for the list only when opening the list from a menu (any menu where that list is available). 
   
   The same applies for lists that you launch from a dashboard, when you create and apply a filter 
   to the list you opened from the dashboard. In this case, the filter is only retained on the list when 
   you open that list from a dashboard (any dashboard where that list is available)

   To speed up the initial display of long lists, a **Get Total** link is available at
   the top of list and filtered list views where there are more than the default 200 rows shown
   on a page. Pagination controls will then be adjusted accordingly.

The Automate Admin Portal provides two options to filter a list view: 

* Advanced filter
* Quick filter



.. rubric:: To filter lists in the Admin Portal: 

1. Log into the Admin Portal. 
2. Open a list view for a resource or service. 
3. Add or modify filter criteria. The table describes the options:

   .. note:: 

      You can also sort the columns of filtered lists.

.. tabularcolumns:: |p{5cm}|p{10cm}|

+-----------------+--------------------------------------------------------------------------------------+
| Filter option   | Description                                                                          |
+=================+======================================================================================+
| Advanced filter | 1. Click the toolbar Filter icon to launch the **Filter** dialog.                    |
|                 | 2. Specify filter criteria:                                                          |
|                 |                                                                                      |
|                 |    * Select a field and a condition, and enter a filter value.                       |
|                 |    * To run a case-insensitive search, clear **Ignore Case**, else, leave the        |
|                 |      checkbox selected (default).                                                    |
|                 |    * Click **Add Filter Condition**.                                                 |
|                 |                                                                                      |
|                 |      To filter for empty rows in a specific column containing string values, choose  |
|                 |      **Equals** with "None" as value. To filter for non-empty rows in a specific     |
|                 |      string value column, choose **Does Not Equal** with "None" as value. Note that  |
|                 |      this condition does not apply to columns containing numeric or boolean values.  |
|                 |                                                                                      |
|                 |      To filter for strings that optionally contain or match string values,           |
|                 |      choose **Equals** and then the options can be joined with ``[OR]``.             |
|                 |      For example: ``Ben[OR]Jerry`` will filter on values containing or matching      |
|                 |      ``Ben`` or ``Jerry``.                                                           |
|                 |                                                                                      |
|                 | 3. To add another filter, click **Add Another Filter**, then repeat the steps above  |
|                 |    to select another field and condition.                                            |
|                 | 4. Click **Filter**.                                                                 |
|                 | 5. View filter criteria you added.                                                   |
|                 |                                                                                      |
|                 |    * The filter is applied to the list.                                              |
|                 |    * Filter criteria is added to the top of the page (as well as in the Filter field |
|                 |      at the top of the relevant column).                                             |
|                 |    * To add more filter criteria, click the Plus icon (+) adjacent to the criteria   |
|                 |      at the top of the page to open the **Filter** dialog, or click in the           |
|                 |      Filter field for the relevant column to add new criteria.                       |
|                 |    * To edit individual filter criteria, click on the filter to open the **Filter**  |
|                 |      dialog, or edit the criteria in the Filter row for the relevant column.         |
|                 |    * To remove a filter, click the Delete icon (x) for the relevant filter criteria  |
|                 |      at the top of the page, or click the red X icon in the row to remove all        |
|                 |      filters.                                                                        |
|                 |                                                                                      |
|                 | 6. To save your filters as a search, click the Save icon adjacent to the filters.    |
|                 |                                                                                      |
|                 |    Saved searches are added to the user **Account** (from your **Settings** icon),   |
|                 |    under **Saved Searches**.                                                         |
+-----------------+--------------------------------------------------------------------------------------+


.. tabularcolumns:: |p{5cm}|p{10cm}|

+---------------+--------------------------------------------------------------------------------------+
| Filter option | Description                                                                          |
+===============+======================================================================================+
| Quick filter  | 1. Click in the **Filter** field below the header of the column you want to          |
|               |    filter on.                                                                        |
|               | 2. Type in filter criteria (one or more characters; or using ``[OR]`` to join these) |
|               |                                                                                      |
|               |    * The filter is applied to the list.                                              |
|               |    * Filter criteria is added to the top of the page (as well as in the Filter field |
|               |      at the top of the relevant column).                                             |
|               |    * To add more filter criteria, click the Plus icon (+) adjacent to the criteria   |
|               |      at the top of the page to open the **Filter** dialog, or click in the           |
|               |      Filter field for the relevant column to add new criteria.                       |
|               |    * To edit individual filter criteria, click on the filter to open the **Filter**  |
|               |      dialog, or edit the criteria in the Filter row for the relevant column.         |
|               |    * To remove a filter, click the Delete icon (x) for the relevant filter criteria  |
|               |      at the top of the page, or click the red X icon in the row to remove all        |
|               |      filters.                                                                        |
|               |                                                                                      |
|               | 6. To save your filters as a search, click the Save icon adjacent to the filters.    |
|               |                                                                                      |
|               |    Saved searches are added to the user **Account** (from your **Settings** icon),   |
|               |    under **Saved Searches**.                                                         |
+---------------+--------------------------------------------------------------------------------------+


.. rubric:: Filter Examples 

* Specify advanced filter criteria in the **Filter** dialog.

  .. image:: /src/images/filter-dialog-new-gui.png

  .. image:: /src/images/add-another-filter-1.png

* Advanced and quick filter criteria you add displays at the top of the page, and to 
  the top of the relevant column/s.


  .. image:: /src/images/list-filter-new-admin-portal.png

  Showing the use of ``[OR]`` in a quick filter:

  .. image:: /src/images/quick-filter-contains-OR.png



* Advanced and quick filter saved searches display on the user **Account** (from your **Settings** icon),
  under **Saved Searches**.

  .. image:: /src/images/saved-searches-example.png



.. |filter| image:: /src/images/filter-icon-new-gui.png
.. |refresh| image:: /src/images/refresh-icon.png



