# Role Choices

**Role Choices** enable you to add more than one [Role](/guides/glossary/role.md) to an [Ontology](/guides/glossary/ontology.md), when writing [Rules](/guides/glossary/rules.md).

This means you don’t have to duplicate rules for each possible role an ontology might take up. You can simply combine all possible roles for the ontology into one [declaration](/rule-language/declarations.md).

These can be used in all declarations where you can mention roles.

### Syntax

`VARIABLE is [all] ONTOLOGY, ROLE_1`*`, ...`*` `` ``ROLE_N or ROLE_1, ... ROLE_M `

A match with the name `variable` is created for an Instance that has the Ontology `ONTOLOGY` and either all the Roles before the `or` (`ROLE_1` to `ROLE_N`), or all the roles after the `or` (`ROLE_1, ... ROLE_M`).

In case the optional `all` is used in the declaration, `VARIABLE` will hold a list of matching Instances.

### Example: single Instance

```python
p is Person, Settlor or BeneficiaryOfTrust
```

If there is a `Person` Instance in the Case, with the Role `Settlor` or `BeneficiaryOfTrust`, this Instance will be available in the variable `p`.

### Example: list of Instance

```python
ps is all Person, AccountHolder or BeneficialOwner
```

All `Person` Instances that have either the Role `AccountHolder` or `BeneficialOwner` in the Case, will be will be available in the variable `ps`.


---

# Agent Instructions: 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.atfinity.io/rule-language/declarations/role-choices.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.
