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

# Values and references

> Reference fields, variables, users, roles, related data, and prompt parameters.

References let a formula read a value supplied by the current form or workflow. Reference names are case-insensitive, so `[Status]` and `[status]` point to the same value.

## Current fields

Put a field name in square brackets:

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
[Quantity] * [Unit Price]
```

Use the field's configured name exactly as clients see it. If a field is unavailable in the current screen or record, its reference evaluates to `null`.

## Namespaced references

| Reference                      | Meaning                                     | Example            |
| ------------------------------ | ------------------------------------------- | ------------------ |
| `[Field]`                      | Current field or supplied value             | `[Status]`         |
| `Var[Name]`                    | Workflow variable                           | `Var[Threshold]`   |
| `Parameter[Name]` or `[?Name]` | Value collected by a parameter prompt       | `[?Limit]`         |
| `User[Email]`                  | Current user's email                        | `User[Email]`      |
| `User[Name]`                   | Current user's display name                 | `User[Name]`       |
| `User[Role]`                   | Current user's role                         | `User[Role]`       |
| `Role[Name]`                   | Whether the current user has the named role | `Role[Supervisor]` |
| `Related[Name]`                | Supplied related-record value               | `Related[Parent]`  |

## Types stay explicit

Dsync keeps text, numbers, booleans, dates, times, timestamps, durations, locations, users, files, and lists as distinct value types. It does not silently turn text such as `"2"` into the number `2` during arithmetic.

Use a conversion function when the source type does not match the operation:

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
ToNumber([Imported Quantity], "en-ZA") * [Unit Price]
```

<Warning>
  Most comparisons require both values to have the same type. If either side is `null`, comparison operators return `false`; use `IsNull` or `Nz` when missing data needs explicit handling.
</Warning>

## Rendered values

When a formula is inserted into text, its result is printed in a stable form. Use `Format` for client-facing number, date, time, or timestamp presentation instead of relying on the default printed form.
