# Lookups

## Overview

As an administrator you can [create](#adding-lookups) or [modify](#editing-lookups) options for lookup lists (also called drop-down lists, list boxes or picklists) such as categories. These are specific to your system and allow limited modification to the underlying database.

Mutli-level categories are also possible.

{% hint style="info" %}
Not all lists in the system can be edited. Refer to the [list of available lookup categories](https://docs.cw.crisisworks.com/system-administration/configuring-the-system/lookups/list-of-supported-lookups) for those that are supported.
{% endhint %}

{% hint style="info" %}
Editing existing lookups is generally not recommended as this can affect filters and reporting (results for the old values may still appear affecting totals). Instead, it is best to deactivate an existing lookup and add a new one in its place.
{% endhint %}

<figure><img src="https://3923904090-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNy7IznbrPLUq6GJDDQDk%2Fuploads%2FmKgMYgRXcIlvRnbujAhC%2Fimage.png?alt=media&#x26;token=c920a3d1-316a-4a5e-815f-849bad87224e" alt="" width="375"><figcaption><p>Expertise categories ... an example of lookup lists (including sub-lists) that can be modified with custom potions using Lookups</p></figcaption></figure>

### Multi-Level Categories <a href="#multi-level-categories" id="multi-level-categories"></a>

Chained Category and Sub-Category fields may be configured onto various forms.

To manage these, follow these rules:

* Keep the values of the categories to lowercase (the label is the wording that is shown to the end user)
* The value of the sub-category lookup should be prefixed with the value of its category — e.g. for a category of `food`, sub-category values might be `food/burger` and `food/french-fries`.
* A parent category should have at least one sub-category.

<figure><img src="https://3923904090-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNy7IznbrPLUq6GJDDQDk%2Fuploads%2FiEGygJg2n1hmHi2zPxBh%2Fimage.png?alt=media&#x26;token=643dfd80-2d31-43a2-abab-4f4b02b10ab7" alt=""><figcaption><p>Expertise Experience Subcategories Values prefixed with expertise-experience/ indicate to the system that they are subcategories</p></figcaption></figure>

### Access <a href="#requests-usingrequests" id="requests-usingrequests"></a>

To access the Lookups register you will need to sign in with [*System Admin & Data Entry* position](https://docs.cw.crisisworks.com/system-administration/configuring-the-system/..#system-administration-positions).

You can find the *Lookups* register under **System Administration** **> Lookups**.

## Viewing Lookups

Lookups are listed in and searchable via the register [Datagrid](https://docs.cw.crisisworks.com/concepts-and-fundamentals/on-a-computer/using-the-datagrid#data-grid-view). Viewing them in this datagrid may not make much sense and they are rarely if ever changed once created.

To view an existing Lookup:

1. Navigate to the Lookups register datagrid.
2. Locate the item you wish to view. The register includes additional filters for Workflow Status (Active/Inactive) and Region
3. Open the item using the ID
4. To return to the Datagrid use the Back button <img src="https://3923904090-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNy7IznbrPLUq6GJDDQDk%2Fuploads%2FkJtmQ5qacZpOVfkdqfY8%2Fimage.png?alt=media&#x26;token=b4c68b18-dc6e-48bb-8a2e-c14bf3f595be" alt="" data-size="line">

<figure><img src="https://3923904090-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNy7IznbrPLUq6GJDDQDk%2Fuploads%2FKPwiCLBpiCTfV17ZcSWJ%2Fimage.png?alt=media&#x26;token=736c8db4-25f2-4db4-976d-4f318efd5be3" alt=""><figcaption><p>View of a sample lookups register</p></figcaption></figure>

## Settings <a href="#settings" id="settings"></a>

Lookups are divided into the following sections (sections may or may not appear depending on what information is entered, your permissions level, and what mode you're viewing):

| Left Column                   | Right Column          |
| ----------------------------- | --------------------- |
| [Record Notes](#record-notes) | [Workflow](#workflow) |
| [General](#general)           | [Activity](#activity) |

### Record Notes <a href="#record-notes" id="record-notes"></a>

When editing, record notes in the [rich text field](https://docs.cw.crisisworks.com/concepts-and-fundamentals/on-a-computer/using-the-datagrid/editing-items#rich-text-fields) as you make changes which will appear in the Activity log.

Refer to: [Recording Notes](https://docs.cw.crisisworks.com/concepts-and-fundamentals/on-a-computer/using-the-datagrid/editing-items#recording-notes)

### General

#### Category

This field defines the list that the item belongs to.

#### Value

This field defines what gets stored in the database, so it typically contains no spaces and is all lower case. Use an underscore or dash as a substitute to spaces.

For example, if the label is Temporary Accommodation, the value would be set to: 'temporary\_accommodation'.

#### Label

This field defines users will see when they go to select the option from the list.

For example, if you want to add Temporary Accommodation to a list, use this as the label.

### Workflow

#### Status

Lookups have only two statuses: Active and Inactive. Active lookups are enabled for use. Inactive lookups cannot be selected as options by users. They can be reactivated and re-added if needed.

Note that reports can still be generated on Inactive or modified lookup options. As such it is advisable to deactivate rather than change them as it can otherwise negatively affect reports.

#### System ID

This field is visible in Edit mode however cannot be edited and is controlled by the system. Do not attempt to change it.

### Activity

Refer to: [Viewing Items: Activity](https://docs.cw.crisisworks.com/concepts-and-fundamentals/on-a-computer/using-the-datagrid/viewing-items#activity)

## Editing Lookups

To edit a Lookup:

1. Navigate to the Lookups register
2. Locate the Lookup you wish to edit by using the Edit button <img src="https://3923904090-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNy7IznbrPLUq6GJDDQDk%2Fuploads%2FMAt3SdDCVeaavZpkxUrB%2Fimage.png?alt=media&#x26;token=bf8178b8-3a9c-4b0d-9c30-009542c2ad7b" alt="" data-size="line">
3. Make the necessary changes to the [settings](#lookup-settings)
4. Save <img src="https://3923904090-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNy7IznbrPLUq6GJDDQDk%2Fuploads%2FN4Q1ymwZJ5s252DI8Xac%2Fimage.png?alt=media&#x26;token=ea3758c1-f326-47ba-ac4c-c1460bcfcd0f" alt="" data-size="line"> to save your changes

## Adding Lookups

To add a Lookup:

1. Use the [New Item button](https://docs.cw.crisisworks.com/concepts-and-fundamentals/on-a-computer/using-the-datagrid/adding-items) for New Lookup <img src="https://3923904090-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNy7IznbrPLUq6GJDDQDk%2Fuploads%2Fru06OHj2lAmNlOWbb3bZ%2Fimage.png?alt=media&#x26;token=f1feede5-bd0d-4359-b5eb-bf2ac89a7175" alt="" data-size="line">
2. Select a **Category** and enter a **Value** and **Label** for the Lookup
3. Use the **Save** button <img src="https://3923904090-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNy7IznbrPLUq6GJDDQDk%2Fuploads%2FWyvhwIZJBvXfK2U8LqPC%2Fimage.png?alt=media&#x26;token=79843521-0f38-4c32-b05b-3fa126a9b4e6" alt="" data-size="line">

{% hint style="info" %}
If your new Lookup does not appear in a list immediately, you may need to [Reload App Data](https://docs.cw.crisisworks.com/concepts-and-fundamentals/on-a-computer/your-user-profile-and-duties#app-data) in your User Profile to update the lists on your site.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cw.crisisworks.com/system-administration/configuring-the-system/lookups.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
