# User Collection Views

{% hint style="danger" %}
Due for Removal, please speak to support for further info.

**09/06/2025:** MSquared will no longer be supporting "user collections" as a concept (or datasources). If you want similar functionality, it will need to be implemented via an alternative storage system, e.g. the [KV Store](/platform-documentation/creation/unreal-development/features-and-tutorials/online-services/kv-store-service.md).
{% endhint %}

Typically when working with user collection, we want a filtered list of objects. An example of this might be a "picture frame" interactable object that allows the player to select an image to display from the user's user collection. This feature would like to filter the user collection for objects that have images. To do this, user collection views are the right way to go.

## How to Implement a User Collection View

To user user collection view, you will first need a view class (a class derived from `UM2_UserCollectionsView`). Ideally you should reuse a view that has already been defined the suit your needs. There is no point to defining two different view classes that both filter for images. This would only cause inefficiancies.

View classes need to override `IsObjectRelevantToView`. This function should return true if the input object meets your filter condition and false if not.

<figure><img src="/files/Q41Rii3iCcU86YBtxVuf" alt=""><figcaption><p>Example of overriden <code>IsObjectRelevantToView</code> that filters for objects with images.</p></figcaption></figure>

Once you have your user collection view class configured to your liking, you can call `GetUserCollectionsViewObjects` on your user collection service to grab a list of relevant objects. You should provide your view class as an arguemnt. Additionally you can specify if you want to include any updates to the user collection since the function was last called with a given view by setting `UpdateIfDirty`.

<figure><img src="/files/pMuMFjx0N3lstX8jo0PK" alt=""><figcaption><p>Example of using <code>GetUserCollectionsViewObjects</code>.</p></figcaption></figure>


---

# 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.otherside.xyz/platform-documentation/creation/unreal-development/features-and-tutorials/user-collections/user-collection-service-in-unreal/user-collection-views.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.
