# Lists

To setup a list view, simple copy/paste the URL of a view.

Optimally you should strip anything but the parameters from the URL.

```
?SagID=252&command=list&QUERY_FIELD_1=OPFLGNING& ...
```

#### <span class="mw-headline" id="bkmrk-filtering-the-list">Filtering the list</span>

To filter the list, add three parameters to the url, pr filter. Make sure that every set of parameters have their own unique number.

```
?SagID=252&command=list&QUERY_FIELD_1=OPFLGNING&QUERY_PARAM_1=1&QUERY_VALUE_1=0 ...
```

Operators:

<table class="wikitable" id="bkmrk-id-command-note-1-%3D-"><tbody><tr><th>ID</th><th>Command</th><th>Note</th></tr><tr><td>1</td><td>=</td><td>Only rows with values equal to</td></tr><tr><td>2</td><td>&lt;</td><td>Only rows with value lower than</td></tr><tr><td>3</td><td>&gt;</td><td>Only rows with values higher than</td></tr><tr><td>4</td><td>!=</td><td>Only rows with values not equal to</td></tr><tr><td>5</td><td>&lt;=</td><td>Only rows with value lower than or equal to</td></tr><tr><td>6</td><td>&gt;=</td><td>Only rows with values higher than or equal to</td></tr><tr><td>7</td><td>CONTAINS</td><td> </td></tr><tr><td>8</td><td>Starts with</td><td> </td></tr><tr><td>9</td><td>Ends with</td><td> </td></tr><tr><td>10</td><td>IS null</td><td> </td></tr><tr><td>11</td><td>IS NOT NULL</td><td> </td></tr><tr><td>15</td><td>IN DAY</td><td> </td></tr><tr><td>16</td><td>IN MONTH</td><td> </td></tr><tr><td>17</td><td>IN YEAR</td><td> </td></tr><tr><td>20</td><td>HAS</td><td> </td></tr><tr><td>21</td><td>HAS NOT</td><td> </td></tr><tr><td>22</td><td>HAS NONE</td><td> </td></tr><tr><td>23</td><td>HAS ANY</td><td> </td></tr><tr><td>24</td><td>IN</td><td>Only rows with values equal to one of the given (comma separated list)</td></tr></tbody></table>

If you are signed in as an admin on a server with a version newer than 7956, you will have access to the "url button".

This button redirects you to the full url, that generates the current filtering, that you have on your list.

This might be an easier way to generate the correct url, when creating dashboard-list-widgets.

#### <span class="mw-headline" id="bkmrk-special-case%3A-list-o-1">Special case: List of values in search parameters</span>

Currently lists of search parameters are encoded

```
 ... &QUERY_VALUE_3=11344%2C11343%2C11345& ...
```

To make them work in list views, please decode the kommas

```
 ... &QUERY_VALUE_3=11344,11343,11345& ...
```

(just change "%2C" to ",")

### <span class="mw-headline" id="bkmrk-dynamic-selectors-1">Dynamic selectors</span>

A special case of the SQL query is the selectors. A selector will allow you to select a value or an ID for use as a parameter in another SQL query or a List view.

A selector will have a name defined by setting its column name in the query

```mysql
  SELECT DataID, CUSTOMER AS SelectedCustomer FROM data_customer WHERE StatusID = 123
```

In this case the value of DataID is set in a user specific variable named SelectedCustomer. The proper notation is in brackets \[\].

This can now be used in list and SQL definitions

```mysql
  SELECT BILLINGDATE, AMOUNT FROM data_invoice WHERE CUSTOMER = [SelectedCustomer]
```