Skip to content

M6-S1 — Build I: a module, an entity and its fields

Section titled “M6-S1 — Build I: a module, an entity and its fields”
ModuleM6 — Build the data
After this session you canCreate an application’s module and one entity with correctly typed fields, and add a first record to it.
TimeFacilitated: 31 min · On your own: 31 min
Before you startM2-S1: module, entity, field. M4-S1: records and Kanban. Signed in as yourself; your account can build.
Go deeperMy first application: plan your app · Create the module · Create the Tasks entity

◆ Orientation (1 min) — From user to builder

Section titled “◆ Orientation (1 min) — From user to builder”

Until now you have used an application someone else built. From here to Module 9 you build one: Team Tasks. A manager creates a task and assigns it to a colleague; the colleague is told at once; the team follows every task on a board, on the web and on the phone.

Builders follow the same five questions as Module 1. The need is above. Today you answer the data question: what does the application keep records of, and what does each record hold? By the end of the session your application exists, it holds one kind of record, and you have added the first one.

▤ Concept (5 min) — Plan the data, then build it

Section titled “▤ Concept (5 min) — Plan the data, then build it”

Applications are built on the web, under Administration › Applications. In a real organization, building needs the Developer access level (or higher), which your administrator grants; your practice account already has it. Building is web-only: the mobile app shows what you build but cannot build it.

The application needs one module and one entity:

PieceNameWhy
ModuleTask ManagementThe container for the whole application, with its own place in the sidebar.
EntityTasksThe one kind of thing Team Tasks keeps records of. Each record is one task.

Every task holds five pieces of information. Choosing the field type is the important decision, because the type decides what the field can do later:

FieldTypeRequiredWhy this type
TitleTextYesA short name, typed in. Every task needs one, so it is required.
DescriptionLong-textNoRoom for several lines of detail. Optional, so a quick task is still quick to add.
StatusCategoryYesA choice from a fixed list: To Do, In Progress, Completed. Because it is a category, the board in Module 7 can show one column per status, and a filter can pick not Completed. Its default is To Do.
Assigned ToUserYesA link to a real account, not a typed name. That is what lets the automation in Module 9 notify the right person.
Due DateDateNoA real date, so it can be sorted, filtered and shown on a calendar.

The reasoning to copy: choose the type for what the field must do later, not for how it looks today. A User field is one kind of link from a record to something else; links between your own entities are called relations, and the builder courses teach them. A status typed as free text would look the same on the form, but no board, filter or count could rely on it.

Names, and the one name that never changes

Section titled “Names, and the one name that never changes”

You give every module, entity and field a name in Arabic and in English; that is what people see. From the English name, the platform fills in a normalized name, such as task_management or tasks. Other parts of the application refer to the entity by its normalized name, so it is set when you create the piece and does not change afterwards. Keep the one it suggests, and decide names before you start, as in the plan above. If the name is already taken in the space, the platform adds a number to it (for example tasks159); that is fine to keep too.

If you type a name in only one language, the platform translates it for you when you leave the field (press Tab or click elsewhere): after about 20 seconds, with no sign of progress meanwhile, it fills in the other language and the normalized name. Always read what it produced before you save: a machine translation can pick the wrong sense (Title may come back as Address), and the English name may arrive as a key such as reason_for_the_delay rather than a readable label. For every name a later step refers to, type both languages yourself through the translation button next to the name; it is quicker, and the normalized name cannot be changed later.

Once you save the entity, people with access can create records in it. There is no separate “publish” for an ordinary entity. Screens are different: in Module 7 you will see that a view and a page are invisible to everyone until you publish them.

With a facilitator. The facilitator plays the video, or builds the module and entity live in the same order, before everyone starts the lab.

On your own. Watch the video once before you start. The lab below gives every step in writing, so you can also go straight to it without the video.

The module and the Tasks entity: the opening frame of the video. Follow the link to watch it.

Tutorial · Part 1 of 3 · 2 min 6 s

The module and the Tasks entity

Create the Task Management module and its Tasks entity · Recorded on Osos 1.11.0-alpha.1

What to notice: the order. The module comes first and the entity is created inside it; Create opens the entity’s designer; the fields are dragged in on Structure; nothing is kept until Save and Save Changes. The video also sets a two-column form layout, which this lab leaves out.

⛏ Lab (15 min) — Create Task Management and its Tasks entity

Section titled “⛏ Lab (15 min) — Create Task Management and its Tasks entity”

Goal. Create the Task Management module and the Tasks entity with its five fields, and add one test task.

Before you start. Signed in as yourself, on the web. Keep the plan table above in view.

Create the module

  1. Open Administration › Applications › Modules.
  2. Select Add Module. The NEW MODULE dialog opens.
  3. Enter the Name Task Management in English, and إدارة المهام in Arabic. Leave the Normalized name that is filled in for you (task_management). Leave Sharing and Administration Access as they are.
  4. Pick an Icon, for example a checklist, and type the Description Team task tracking. Select DONE. Task Management appears in the Modules list.

The Add Module dialog with the Name in two languages, the Normalized name filled in, and an icon chosen What to notice: the normalized name is filled in from the English name. You keep it; it cannot be changed later.

Create the entity

  1. Open Task Management. On the Entities tab, select Add Data Entity. The Add New Data Entity dialog opens.
  2. Enter the Name Tasks in English and المهام in Arabic. Keep the Normalized name (tasks). In Select Icon, pick one, for example a check mark.
  3. Check that Choose Module shows Task Management. Keep Data Entity Type as Normal Entity and Data entity template as Default Template.
  4. Under Field Settings, set Single Name to Task and Plural Name to Tasks (used on buttons such as Add Task).
  5. Select Create. The entity’s designer opens: the path at the top ends in Tasks › Designer, with the tabs Details, Structure, Workflows, Timeline and Indexes, and the buttons Lock Entity and Save.

Add the fields

  1. Select the Structure tab. The Fields palette on the left lists the field types; the area on the right has the columns Type, Name, Required and Default Value.

  2. Drag Text onto the empty area and name it Title. Tick Required.

  3. Drag Long-text and name it Description.

  4. Drag Category and name it Status. Tick Required.

  5. Open the Status field’s settings (the gear icon on its row). The Field Settings panel opens. Under Add options, type To Do and select Add; do the same for In Progress and Completed. Each option gets a colour, green at first; change it if you like. Close the panel.

  6. Select Save, then confirm with Save Changes. This first save stores the options, so that they can be chosen as the default.

  7. Open the Status field’s settings again and set Default Value (it reads Select A Category) to To Do. Close the panel. The Status row now shows To Do under Default Value.

  8. Drag User and name it Assigned To. Tick Required.

  9. Drag Date and name it Due Date.

  10. Select Save, then confirm with Save Changes (the dialog asks: Are you sure you want to save all changes?).

The Structure tab of Tasks: the Fields palette on one side, and the five fields Title, Status, Description, Assigned To and Due Date with their types What to notice: each row shows the field’s type and whether it is required; Status also shows its default, To Do. Status, Title and Assigned To are ticked Required.

Test it with one record

  1. In the path at the top, select Tasks to leave the designer. The entity’s first tab, Tasks, opens. Select Add Task. Fill in Title Try the new app, leave Status as To Do, set Assigned To to yourself and pick a Due Date from the calendar (for example this Friday). Select Save. The task appears in the list.

Check.

  • Task Management is in Administration › Applications › Modules.
  • Tasks has exactly five fields, with the types in the plan, and Title, Status and Assigned To are required.
  • Status has exactly the options To Do, In Progress and Completed, and new tasks start as To Do.
  • The test task Try the new app is listed on the Tasks tab, with a due date.

Pass condition. A new task can be added on the Tasks tab, and it opens with Status To Do without you choosing it.

If something goes wrong

What you seeWhat to do
No Applications under AdministrationYour account cannot build. Check the M0-S1 Lab and ask for the system Admin level.
Save is greyed out, with no message, after you add the Date fieldOpen the Due Date field’s settings, switch Calculated on and then off again, and close the panel. Save is available again.
The Default Value list is emptyThe options are not saved yet. Select Save and Save Changes, then open the Status settings again (steps 15 and 16).
The normalized name ends in a number (for example tasks159)The name was already used in the space, perhaps by an earlier attempt. Keep it, or open the existing Task Management in the Modules list and use it instead of creating a second one.
Save stays disabled after you name the module, entity or a field in one language only, with no messageThe platform fills the other language and the normalized name only after you leave the name field, and translating a new word takes a few seconds. Press Tab, wait about 20 seconds, then check. If they are still empty (translation may be unavailable on your platform), open the translation button next to the name, type the other language yourself (for example Title), and save again.
The module or entity will not saveRead the message in red: it names what is missing or wrong.
You cannot find Add TaskYou are still in the designer. Select Tasks in the path at the top.
The test task will not saveA required field is empty. Title and Assigned To must be filled in.
You saved the fields but they are goneYou did not confirm with Save Changes after Save. Add them again and confirm.
Model answer

What your finished entity should look like, and why each choice matters later:

FieldTypeRequiredUsed later in
TitleTextYesEvery list and the notification text (Module 9)
DescriptionLong-textNoThe task’s form
StatusCategory, options To Do / In Progress / Completed, default To DoYesThe Kanban board (Module 7)
Assigned ToUserYesThe notification’s recipient (Module 9)
Due DateDateNoSorting and the list’s columns (Module 7)

If your Status has a fourth option, or a different spelling, fix it now: the board and the capstone check expect exactly these three. Due Date is not required, but give your tasks one: a list shows an empty due date as Invalid date.

◇ Worked scenario (2 min) — Typing the fields of a visitor log

Section titled “◇ Worked scenario (2 min) — Typing the fields of a visitor log”

A reception team wants a Visitors entity: who came, whom they visited, when, why, and any notes. Here is how a builder types each field, using the rule “choose the type for what the field must do later”.

  1. Visitor Name: Text, required. It is a short value typed in at the desk. Visitors are not users of the platform, so a User field would not fit: there is no account to point to.
  2. Host: User, required. The host is a colleague with an account. Because it is a User field, a reaction can later tell the host “your visitor has arrived”, exactly like Assigned To in Team Tasks.
  3. Visit Date: Date, required. A real date can be sorted, filtered (“today’s visitors”) and shown on a calendar. Typed as text, “3/4” could mean two different days.
  4. Purpose: Category, with Meeting, Delivery and Interview. A fixed list keeps the values consistent, so the team can filter deliveries or show a board by purpose.
  5. Notes: Long-text, not required. Free detail, several lines, only when needed. Making it required would slow the desk down for nothing.

The reasoning to copy: for each field ask “what will someone want to do with this value later?” Sort or filter by date: Date. Notify or route to a person: User. Count or group: Category. Just read it: Text or Long-text.

✓ Practice (4 min) — Check your understanding

Section titled “✓ Practice (4 min) — Check your understanding”
PracticeChoose one answer.

An Equipment Loan entity needs a field for the condition of the item when it comes back: Good, Damaged or Missing parts. Which type fits best?

  1. Explanation for A

    ✗ Incorrect

    With free text, people type the same thing in different ways, so no filter or board can rely on it. See The plan for Team Tasks.

  2. Explanation for B

    ✓ Correct

    A fixed list of options keeps the values consistent, so a board can show a column per condition and a filter can pick one. See The plan for Team Tasks.

  3. Explanation for C

    ✗ Incorrect

    Long text is for several lines of free description, not for a choice between three values. See The plan for Team Tasks.

Check your answer

The correct answer is B. Open the explanation under each option to see why.

PracticeDecide whether the statement is true or false.

After you save a new entity, you must publish it before anyone can add records to it.

  1. Explanation for A

    ✗ Incorrect

    An ordinary entity has no separate publish step. Views and pages are the ones that must be published. See No publish step for an entity.

  2. Explanation for B

    ✓ Correct

    Once the entity is saved, people with access can create records in it. Publishing applies to views and pages. See No publish step for an entity.

Check your answer

The correct answer is B (False). Open the explanation under each option to see why.

PracticeChoose one answer.

A colleague wants to rename the Task Management module to Team Work six months from now. What can change, and what cannot?

  1. Explanation for A

    ✗ Incorrect

    The name people see, in either language, can be edited. Only the normalized name is fixed. See Names, and the one name that never changes.

  2. Explanation for B

    ✗ Incorrect

    The normalized name is set at creation and does not change, because other parts of the application refer to it. See Names, and the one name that never changes.

  3. Explanation for C

    ✓ Correct

    People see the new name, while the platform keeps referring to the module by its permanent normalized name. See Names, and the one name that never changes.

Check your answer

The correct answer is C. Open the explanation under each option to see why.

Your application exists. You created the Task Management module and the Tasks entity, gave it five fields with types chosen for what they must do later, made the essential ones required, and added a first task. You know that an entity needs no publishing, and that normalized names are permanent.

Next. Right now only you, inside Administration, can see your tasks. In Module 7 you give them a proper screen: a list with a board, and a home page, published for your team.