1. Home
  2. Administrators
  3. Data fields
  4. How to create an associative tab

How to create an associative tab

Document categories in Docuo can be related to each other by means of Drop-Down List to Other Category (LDAOC) fields. These fields relate ONE document from one category to SEVERAL documents from the other.

In some scenarios it is necessary to relate SEVERAL documents of one category to SEVERAL documents of another. This article explains how to do this.

ONE to MANY relationships in Docuo

Let’s assume two categories, one for Students and one for Provinces. The Pupils category has a field of type LDAOC that allows to choose the province to which the pupil belongs. The following diagram shows the relationship:

The tip of the arrow indicates the category that has the LDAOC field (underlined). The base of the arrow indicates the category in which a tab with related documents will be displayed.

In this type of relationship, ONE province can be assigned to SEVERAL students. We can see that the province Madrid is assigned to the students Andrés Ramírez and Cristina Albéniz.

Each student can only be assigned to one province

In the student details window, we will have the LDAOC field “Province”, where we can choose ONE province (the student’s province).

In the provinces details window we will have a tab called “Students” where we can see a list of the students assigned to that province.

VARIOUS to VARIOUS relationships in Docuo

Let us now look at a different problem: If we want to associate the students with the different subjects in which they are enrolled. Unlike the previous problem we now find that:

El mismo alumno puede estar matriculado en VARIAS asignaturas y la misma asignatura puede ser impartida a VARIOS alumnos.

To solve this problem in Docuo, we must create a third category that associates the values of the other two. We call this type of category “ASSOCIATIVE CATEGORY”, which is shown in yellow in the diagram:

The tip of the arrow indicates the category that has the LDAOC field (in this case two underlined fields). The base of the arrow indicates the categories in which a tab with related documents will be displayed.

We can see that the associative category manages that Luisa is enrolled in mathematics and chemistry and also that Andres and Cristina are the students enrolled in physics.

For a category to be associative it only needs two fields of type List Deployable to Other Category (LDAOC) that point to the categories to be associated.

The associative category could have more fields, such as the grade that student has obtained in that subject.

If we follow these instructions, to say that a student is enrolled in a subject, we have to manually create a record in “Students and Subjects”. Similarly, if we want to delete the association, we must delete that record.

This user experience is not satisfactory from the user’s point of view. The following section shows how to make the associative category “invisible” to the user from the associated categories.

Converting a “Normal Tab” into an “Associative Tab”.

What does an associative category look like in a “Normal Tab”?

Continuing with the previous example, let’s see what Luisa Gomez’s student file looks like in Docuo:

On the right we can see Luisa’s associations with her subjects: Chemistry and Mathematics. If we double click on the association with Mathematics, a “Students and Subjects” record opens:

If now we want Luisa to enroll in Physics, we would have to click on the “New document” button in the Students and Subjects tab and choose in the Subject field the value “Physics”:

By clicking “Save and close”, Luisa would be associated to the three subjects:

This experience of use may be valid for a few records, but if we were to associate a student with 15 subjects, we would have to click 15 times on “New document” in his record, and go choosing the 15 values, which is not very efficient.

Configuration of the associative tab.

Let’s take a look at how the “Students and Subjects” tab is configured by default:

Docuo detects that “Students and Subjects” could be an associative category and offers the option to show this tab as an “Associative tab”. Let’s see how it looks like if we activate this check:

Docuo now understands that the tab is used to create and delete “Students and Subjects” records.

Let’s see how the user experience has changed:

User experience with an “Associative Tab”.

Suppose we have a new student: Cristina Albéniz, and we want to enroll her in Mathematics and Chemistry:

The first thing we see is that the old “New Document” button is now called “Add”. Let’s click it:

We can directly mark the two subjects in which Cristina is going to enroll. When you click OK in the dialog, two records will be automatically created in “Students and Subjects”:

Updated on 14 de October de 2024
Was this article helpful?

Related Articles