Related entities are entities that people can use to interact with when using planning tools such as the Related entity calendar, Enter scheduled data and Enter appointment tools. Entities can be people, places or equipment- for example, Doctor Smith, Main stage and Skinfold calipers #2 are all examples of entities that you may book events against.
This article covers the following topics:
- Using related entities.
- Steps to build a related entity form.
- Populating a related entity form.
- Referencing a related entity form in an event form.
Using related entities
Related entity forms are created for entities that do not need to have data entered against them and therefore can’t exist within Smartabase in the same way a normal user account can. The use of related entities instead of user accounts also means that the entity can interact with multiple people, which is not normally possible outside of the coach-athlete relationship. This allows plans to be made that involve these entities and groups or individuals.
Related entity forms are created using the Related entity forms tool, which allows a builder to set up related entity forms that store records of entities in much the same way that a database form stores database records. It can be useful for planning purposes to include an email field in a related entity form so that the entity’s calendar can be notified when it has been added to a scheduling or appointment form. Related entity forms can then be referenced within an appointment or scheduling event form to create a booking workflow.
Steps to build a related entity form
- Log into the builder interface.
- Select the Related entity forms tool.
- Select New related entity form from the Options drop-down menu.
- Name the related entity form based on the types of entities that will be used (e.g. Doctor, Physiotherapist or Location).
- Name the section, or delete New section from the section title to leave it blank.
- Add a Single line text field called Name.
- If your workflow involves sending iCals to someone associated with a specific entity, add a Single line text field named Email to input their email address. For example, you may have a related entity form for a physiotherapist and they use iCals to add their Smartabase bookings to an external provider. You could enter their email address here so that the iCals are sent to them when published.
- Add any other fields that relate to the entity as required. For example, you could include a Dropdown field for the entity's specialty or the clinic they work at.
- To set available times for the entity, add a Multiple time period field named Availability.
- Save the related entity form.
Populating a related entity form
As a builder, you can add related entity form records using the Related Entity forms tool. Each related entity form has an Add/edit records button next to it in the list of forms. When you select this option, you'll be able to view all entities for the related entity form.
Use the Options dropdown menu to create new entities by filling in the related entity form and saving each entity. If your related entity form contains a Multiple time period field, you must complete this field otherwise the entity will be shown as unavailable at all times.
Referencing a related entity form in an event form
Once a related entity form has been created, it can be added to an event form by adding a Related entity field to the form and selecting the related entity form in the advanced properties. The example below shows our Physiotherapist Appointment event form containing a Related entity field. The field has been named Physiotherapist to match the related entity form that it references in the Advanced properties section (not pictured).
To reference a related entity form in an event form, follow the steps below:
- Log in to the builder interface.
- Select the Event forms tool.
- Open or create an appointment or scheduling form.
- Add a Related entity field.
- In the Advanced properties tab, select the related entity form you need using the Related entity property.
- Save the event form.
Note that people must have data permissions for both the event form and the related entity form. Likewise, for the workflow to be fully functional on the mobile application, the event form and the related entity form must have their advanced properties set to be available on the mobile app (Exclude Athlete app).