# 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: 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/operators/unknown-operators/union_of_any.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.
