# Creating a link to the TIVITY File Class

To attach files to our tasks, we make use of the TIVITY File class, which originates from the Documents App. Each task item can have multiple files attached, but each file is related to only one task item, which we describe as **One-To-Many relationship**.

To be able to use the TIVITY File class in our app we need to add the TIVITY File class to our application. For this, go to **General > Classes Tab** and select the class **TIVITY File**.

![Adding Tivity File Class to our application](/files/-MA6LUJK5_t5OZ0wFk73)

Now we can link the TIVITY File class to the class we previously created. We go back to **Classes**, expand our class and expand **Links** and select **TIVITY File** and click the plus icon:heavy\_plus\_sign:.

![Creating a link to the TIVITY File](/files/-MA6O4vX2rMf57Ralc9G)

On the next window in the **Common Tab**, we need to set the Field for the Tivity File to **Instance (Ref) and** the link between the two classes is represented by **YourClass.Id ↔ TIVITY File.Instance (Ref)**. Since we want the link to be bidirectional, we check **Is Source** for both classes.

In the **Advanced Tab**, we set the **Controller** as **Default** and the **Type** as **OneToMany**

![TiIVITY File link Properties](/files/-MAX_7zj-eBotD51bq4O)

With this part done, we can move on to the next chapter!


---

# 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.tivity.one/overview/getting-started/creating-a-link-to-the-tivity-file-class.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.
