> For the complete documentation index, see [llms.txt](https://docs.atfinity.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.atfinity.io/rule-language/operators/unknown-operators/union_of_any.md).

# UNION\_OF\_ANY

### Description

`UNION_OF_ANY` is the flexible counterpart of [`UNION`](/rule-language/operators/list-operators/union.md).

It creates a combined set of all the lists you provide. Duplicates in the new list will be removed.

If a value or list is not available:

* `UNION_OF_ANY` simply ignores it and combines what is available.
* `UNION`, before returning a result, will ask users to go back and provide the missing list.

### Examples

```
p is Person
UNION_OF_ANY(
    p.countries_lived_in, 
    p.countries_banned_from
)
```

A person in a case has lived in Germany, Switzerland, and Singapore. Being a fine, law abiding citizen, the person has not been banned from any countries.

The above [expression](/rule-language/expressions.md) will result in the list

\[de, ch, sg]<br>

Because `UNION_OF_ANY` is used, the request for ‘countries banned from’ is ignored, because there are none for this person.

Would you have used `UNION` instead, the system would have alerted you to provide one or more countries the person is banned from before giving you the combined list.\ <br>


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.atfinity.io/rule-language/operators/unknown-operators/union_of_any.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
