> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chemolytic.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Managing properties

> Create, edit, and delete sample properties for your project.

Properties are defined once per project and used by all samples in that project. Go to **Samples** in the project sidebar and click the **Properties** tab.

<Frame>
  <img src="https://mintcdn.com/chemolytic/Z4NdeoejDDDPqHhB/images/screenshots/samples/properties-tab.png?fit=max&auto=format&n=Z4NdeoejDDDPqHhB&q=85&s=fbafe75931cf013878d30be152cca511" alt="Properties tab showing property cards with name, type, unit, and categories" width="1714" height="1196" data-path="images/screenshots/samples/properties-tab.png" />
</Frame>

## Creating a property

Click **Add property** to open the create dialog.

<Frame>
  <img src="https://mintcdn.com/chemolytic/Z4NdeoejDDDPqHhB/images/screenshots/samples/create-property.png?fit=max&auto=format&n=Z4NdeoejDDDPqHhB&q=85&s=d5fbeeeae1d9435b43175a555675caf3" alt="New property dialog with name, type toggle (continuous/categorical), and unit field" width="1720" height="1186" data-path="images/screenshots/samples/create-property.png" />
</Frame>

### Fields

| Field          | Required               | Notes                                                                          |
| -------------- | ---------------------- | ------------------------------------------------------------------------------ |
| **Name**       | Yes                    | Unique within the project. Max 100 characters. Case-sensitive.                 |
| **Type**       | Yes                    | Continuous or Categorical. Cannot be changed easily after samples have values. |
| **Unit**       | No (continuous only)   | Free-text label. Examples: °Bx, mg/L, %, pH. Max 50 characters.                |
| **Categories** | Yes (categorical only) | Minimum 2 categories. Each up to 100 characters.                               |

### Continuous properties

Select the **Continuous** toggle. Enter an optional unit. The unit is shown in the samples table next to the value.

Common units: `%`, `°Bx`, `mg/L`, `pH`, `g`, `ppm`, `mol/L`.

### Categorical properties

Select the **Categorical** toggle. Type each category name and press **Enter** (or click **Add**) to add it. Click the X on a pill to remove it.

<Warning>
  You must add at least 2 categories. The error "Add at least 2 categories" appears if you try to save with fewer.
</Warning>

<Tip>
  Decide your full category list before adding samples. Adding a category later is fine, but renaming or removing one will break existing sample targets.
</Tip>

## Editing a property

Hover over a property card and click the pencil icon. You can change the name, type, unit, and categories.

<Warning>
  Changing the **type** of a property after samples have values can invalidate those values. For example, changing Continuous to Categorical will reject any existing numeric value that doesn't match a category.
</Warning>

## Deleting a property

Hover over a property card and click the trash icon.

<Warning>
  You can only delete a property that has **no sample targets** referencing it. If any sample has a value for this property, you must clear those values first. The error message is: "Cannot delete '{name}'. It has sample targets associated with it."
</Warning>

To remove a property that's in use:

1. Clear the column in your CSV and re-import (sets all values to empty for that property), or
2. Edit each sample manually and remove the property value
3. Then delete the property

## Common errors

<AccordionGroup>
  <Accordion title="A property with this name already exists">
    Property names are unique within a project. Use a different name or rename the existing property first.
  </Accordion>

  <Accordion title="Cannot delete '{name}'. It has sample targets associated with it.">
    Some samples still have values for this property. Clear those values (manually or via CSV) before deleting.
  </Accordion>

  <Accordion title="Categorical properties require at least 2 categories">
    Categorical properties must have at least 2 distinct category values. Add more categories or switch to Continuous.
  </Accordion>

  <Accordion title="Categories must be empty for continuous properties">
    The categories list is only for categorical properties. Switch the type or remove the categories.
  </Accordion>
</AccordionGroup>
