References between data items

Some Properties for Data items are actually other Data items. For example, when you have a project that has tasks. In this case, you will need a Reference.

How to add a Reference

  1. Start by adding a Property to your Data type, and choose Reference:
    Reference property

  2. You will then be asked which Data item to reference to. In this example we are adding a Property to Project so we select to reference to Task:
    Data item reference

  3. Give the Property a name. It is good to think ahead a bit here, to decide whether you want a singular or plural name. In our case, we want to call the Property Tasks because a Project can have more than a single Task related to it:
    Property name

  4. Then you have to select how Project is related to Task. In our example, a single Project can have more than one Task:

  5. Then you have to select how Project is related to Task. In our example, a single Project can have more than one Task:

  6. Triggre will also create a Property for Task and the final step is to give that Property a name. Since we decided a Task to relate only to a single Project we can simply call the Property that:
    Property name

  7. Triggre will show you this Reference as a line between the two Data item properties:
    Data item reference

  8. Notice how Tasks is of the Property type Task list. This indicates that each Project can now have a list of Tasks.
    For Task the Property type is simply listed as Project. This means every Task can only have a single Project: