> For the complete documentation index, see [llms.txt](https://help.clause9.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.clause9.com/special-functions/datafields.md).

# Datafields

### @assigned <a href="#assigned" id="assigned"></a>

* parameter: a datafield
* returns true or false
* see also: @implemented and @cascade

Returns true if *some* value is assigned to the datafield (i.e., if the datafield is not equal to *unassigned).*

Tip: you can easily invert the behaviour of this special function: `not(@assigned(#concept^datafield))` will return true if the datafield is *not* assigned any value.

In visual terms, the `@assigned` function actually boils down to the question whether the data dashboard shows the left side (= no value assigned) or the right side.

<figure><img src="https://1353649376-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaTEDNbiFdDa6DW2eNG17%2Fuploads%2F2iGIRtMVIrVkrPJpOfkD%2Fimage.png?alt=media&amp;token=1a6a89c7-885f-4e29-8434-74f2f41de010" alt="" width="563"><figcaption><p><code>date</code> and <code>delivery-location</code> are not assigned any value</p></figcaption></figure>

<figure><img src="https://1353649376-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaTEDNbiFdDa6DW2eNG17%2Fuploads%2FcxjsbW2JrC0QgQMyuNZK%2Fimage.png?alt=media&amp;token=9ebb1cd5-5080-43ee-b4bf-1b4208111fa2" alt="" width="375"><figcaption><p><code>date</code> is assigned a value (so that <code>@assigned(#order^date)</code> would return <code>true</code>), while <code>delivery-location</code> is still not assigned a value</p></figcaption></figure>

{% hint style="danger" %}
The `@assigned` function may cause quite some surprises for new users.

Be aware that assigning an *empty text* value to a text datafield (visually shown in the data dashboard as an empty text box) causes the `@assigned` function to return true for that datafield.\
\
Similar surprises will happen with:\
\* assigning the value *false* to a true/false datafield (visually represented as a checkbox that is not checked)\
\* assigning the value 0 to a number datafield\
\* assigning a collection of no items to a list of text or repeating datafield — which will already happen in a Q\&A when a question has been associated with this datafield

because all of these situation cause the `@assigned` function to return true for that datafield, because “something” is assigned (yes, even an empty collection is “something”). This will probably come as a surprise if you are new to thinking in data types.

Tip: to check whether at least one item is assigned to a list of text or repeating datafield, you can use `@count(#concept^datafield) > 0`
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.clause9.com/special-functions/datafields.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
