> For the complete documentation index, see [llms.txt](https://docs.planetcrust.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.planetcrust.com/platform-administration-console/examples/contextual-role-expression-examples.md).

# Contextual Role Expression Examples

<p align="center"><a class="button primary" data-icon="square-caret-right">Try @Human</a><a class="button primary" data-icon="check">Buy @Human Subscription</a><a class="button primary" data-icon="comments">Join @Human Community</a></p>

<table data-header-hidden><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Resource owner</strong></td><td><p>Assign this role when the current user is the resource owner.</p><pre class="language-none"><code class="lang-none">userID == ownerID
</code></pre></td></tr><tr><td><strong>Resource owner but not the creator</strong></td><td><p>Assign this role when the current user is the resource owner but not the original creator.</p><pre class="language-none"><code class="lang-none">userID == ownerID &#x26;&#x26; userID != creatorID
</code></pre></td></tr><tr><td><strong>Mentioned in the multi-value module field</strong></td><td><p>Assign this role when the current user is mentioned in the <code>editor</code> multi-value field of the given record.</p><pre class="language-none"><code class="lang-none">has(resource.values.editor, userID)
</code></pre></td></tr><tr><td><strong>Record owner with a specific record state</strong></td><td><p>Assign this role when the current user is the record owner and the value of the <code>published</code> field is false.</p><pre class="language-none"><code class="lang-none">userID == ownerID &#x26;&#x26; !resource.values.published
</code></pre></td></tr></tbody></table>


---

# 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 dynamically by asking a question.

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

```
GET https://docs.planetcrust.com/platform-administration-console/examples/contextual-role-expression-examples.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.
