> For the complete documentation index, see [llms.txt](https://codifi-fdm.gitbook.io/codifi-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codifi-fdm.gitbook.io/codifi-docs/mobile-app/creating-records/understanding-archetypes-and-relationships.md).

# Understanding Archetypes and Relationships

Think of your Project like a family tree. Just as a family tree shows who can be whose parent or child, your Project has rules about which Records can contain which other Records.

#### Example Structure

```
Your Project
└── Survey Area
    └── Transect
        └── Isolated Find
        └── Potential Site
            └── Artifact
            └── Datum
```

In this example:

* **Survey Areas** can contain **Transects** (Survey Area is the parent of Transect)
* **Transects** can contain **Isolated Finds** and **Potential Sites** (Transect is the parent of Isolated Find, and of Potential Site)
* **Potential Sites** can contain **Artifacts** and **Datums** (Potential Site is the parent of Artifact, and of Datum)

**Your Project administrator set up these relationships when they created your Project template.** You might have a similar structure within your Projects, or you might find yours are very different. You work within this structures so that your Project data stays organized.

***

### Why Can't I Create a Certain Archetype?

Your Projects are configured with certain preset rules for what kinds of Records can be related to each other, and in what quantities. These are determined by the admin who configured your Projects.

Sometimes when trying to create new Records in a Project, you'll notice an archetype is grayed out and unavailable. Here's why that happens:

#### Reason 1: "You've Already Created One"

Some archetypes have a **"one only" rule**. This means a parent Record can only have one child of that archetype.

**Real-world example:** A Site can only have ONE Datum Record. Once you've created the Datum, you can't create another one under the same Site.

**What you'll see:** The "Datum" option will be grayed out with a note explaining it already exists.

**What to do:** If you need to edit the existing Record, find it in your list and tap on it. If you truly need the ability to have multiple, talk to your Project administrator about the Project setup.

#### Reason 2: "Wrong Parent Type"

Each archetype can only be created under certain parent archetypes. You can't create a Room directly under a Site—it needs to be under a Building first.

**Real-world example:** You're looking at a Survey Area Record and want to add an Artifact Record. But Artifacts belong inside Sites, not directly inside Survey Areas.

**What to do:** First create (or find) the Site, then add the Artifact to that Site.

#### Reason 3: "Top-Level Records Only"

Some archetypes can only be created at the Project level, not as children of other Records.

**Real-world example:** A Survey Record might be designed to exist at the top level of your Project, not nested under a Site or Building.

**What to do:** Navigate to your Project's main Records list and create the Record there, rather than as a child of another Record.

***

Your Project uses relationship rules to keep data organized. Here's a plain-English explanation:

| Rule Type          | What It Means                    | Example                       |
| ------------------ | -------------------------------- | ----------------------------- |
| **One allowed**    | Only one of this type per parent | One Datum per Site            |
| **Many allowed**   | Create as many as you need       | Multiple Artifacts per Site   |
| **Top-level only** | Can only exist at Project root   | Survey Records                |
| **Nested only**    | Must be under a specific parent  | Rooms must be under Buildings |

***

* **When in doubt, check the Graph View.** It shows you exactly what's possible.
* **Grayed-out options aren't a mistake.** The system is helping you follow your Project's rules.
* **Work top-down.** Create parent Records before their children. You can't add Rooms if you haven't created the Building yet.
* **Use auto-generated names.** They keep your Records consistently named and numbered.
* **Ask your administrator** if something seems wrong. They can adjust the next Project's configuration if needed.

***

| Action                                  | How To                                            |
| --------------------------------------- | ------------------------------------------------- |
| Add a child Record                      | Swipe right on parent → Add Child Record          |
| See all archetypes                      | Open add screen → Switch to Graph View            |
| Understand why something is unavailable | Check the grayed-out section for explanation      |
| Create at Project level                 | Navigate to main list (not inside another Record) |

***

### Common Scenarios

#### "I need to add multiple inspections to a site"

1. Navigate to the Site in your Records list
2. Swipe right → Add Child Record
3. Select "Inspection"
4. Create your first inspection
5. Repeat for additional inspections

If "Inspection" is grayed out after your first one, your Project has a "one only" rule. Check with your administrator.

#### "I can't find the archetype I need"

1. Try switching to Graph View to see all available archetypes
2. Check if you're adding to the correct parent Record
3. Some archetypes might only be available at the Project level

#### "I accidentally created a Record under the wrong parent"

Records can be moved or linked differently. Check with your Project administrator about the best way to fix this, as it depends on your Project's rules.
