Quick Exercise

Configure the data model

  1. Open the Data model editor, the entry is found in the navigation menu.

  2. Create tables and fields

    1. Create a new table by clicking the Create new button in the left corner under the Tables tab. Name the new table "Employee".

    2. Add a new field to the table by clicking th Create new button under the Fields tab.

      Give the new fields the following specifications:

      Name Type List/Parent table Mandatory Unique

      Avatar

      File

      E-mail address

      Text

      First name

      Text

      Full name

      Text

      Last name

      Text

      Number of active projects

      Number

      Phone number

      Text

      Salary

      Number

      Standard work hours (week)

      Number

      Title

      Text

    3. Add a new table and name it "Daily Status". Add the following fields to the new table.

      Name Type List/Parent table Mandatory Unique

      lseActive projects

      Number

      Average project completion

      Number

      Date

      Date

      Meetings

      Number

      Percentage of employees at work

      Number

      Working Employees

      Number


  3. Drop-downs, lists and list items

    Sometimes we want the values of a field to be fixed to the values in a list. In those cases we use Drop-downs and lists.

    1. Add a new list by first clicking the Lists tab. Then click the Create new button. Name the new list "Departments"

    2. Add list items to Departments by clicking the Create new button under the List items tab.

      Add the following list items to the list:

      Name Type

      Human resources

      List item

      Finance

      List item

      Marketing

      List item

      Administration

      List item

      Project management

      List item

      Sales

      List item

    3. Add a new list named "Employee status" and add the following list items.

      Name Type

      Working (available)

      List item

      Working (unavailable)

      List item

      Sick leave

      List item

      On administrative leave

      List item

      Unavailable (personal)

      List item

      On vacation

      List item

      Off work

      List item

      Terminated

      List item

    4. Go to the Employee table and add the following fields.

      Name Type List/Parent table Mandatory Unique

      Department

      Drop-down

      Department

      Status

      Drop-down

      Employee Status

      The values of Department and Status in the data records of Employee will now be fixed to the Departments and Employee status lists

  4. Relations

    Sometimes you want a field to represent data record in another table, in those cases, we use relations.

    1. Add a new table named "Project" with the following fields.

      Name Type List/Parent table Mandatory Unique

      Project name

      Text

      Actual required human-hours

      Number

      Completion status

      Number

      Project index

      Number

      Projected human-hours

      Number

      Project overview

      Note

      Main department

      Drop-down

      Department

      Active

      Checkbox

      Manually scheduled

      Checkbox

      Actual completion time

      Date time

      Actual start time

      Date time

      Projected completion time

      Date time

      Projected start time

      Date time

    2. Add the two following fields to "Project".

      Name Type List/Parent table Mandatory Unique

      Project manager

      Relation

      Employee

      Parent

      Relation

      Project

      This will make Project manager store data records from the Employee table and Parent will store previous data records from Projects.

    3. Go to the Employee table and add the following field.

      Name Type List/Parent table Mandatory Unique

      Most recent project

      Relation

      Project

Configure the forms

  1. Open Form designer in the Navigation menu.

  2. Click the big gray area under the top menu to get the Properties menu. Set the form caption to "Employee Overview". This will be the name that the form is saved as.

    Always start the design of a form by giving the form it’s caption.
  3. To display record information with a built in selector, add a Multi detail section by dragging down from the Multi detail button.

    1. Set the Datasource to "Daily Status" in the Properties section.

    2. In the Fields section drag out Active projects and place it in the Multi detail section. This will add a Number field with Active projects as datasource and a Label field which is the label for the Number field that has been added. Do the same thing with Working Employees and Date.

    3. Add a Meter to the Multi detail section by clicking the Meter button and then placing the Meter inside of the Multi detail section. Choose Avarage project completion as datasource. Add a Label, place it beside the Meter and make it the label for for the Meter.

      Save the form before adding the Label. It will then be easier to find the field which the Label is intended to be the label for.

      Before proceeding further, add a Meter with Percentage of employees at work as datasource and a label for it.

  4. The next task is to display info about an employee.

    1. We begin by adding a Selector. Set the datasource to Employee.

    2. To display information from the record chosen by the Selector, add a Detail component. Set the datasource to Employee and limited by the Selector.

    3. Add the following fields from the Fields section:

      • First name

      • Last name

      • Department

      • Title

      • E-mail address

      • Phone number

      • Standard work hours (week)

      • Salary

      • Latest clock-in

      • Latest clock-out

    4. Add another Detail component for displaying of projects. Set the datasource to Employee and also make it limited by the previously added Detail component.

      1. From the Fields tab, add Project name.

        Because of Project name being a field in Project and not in Employee, we must click Most recent project to display Project name in the Fields tab.

      2. Add a Multi-value component to the Detail component. Give it the following properties.

        Relation field

        Employee [Link: Project & Employee]

        Datasource

        Project

  5. To get a good overview of all employees, add a Repeater component and set the datasource to Employee.

    1. Add the following components to the Repeater.

      • Full name

      • Status

      • Department

      • Title

      • Most recent project

  6. We now have a working form that can be found under General in the Navigation menu. There’s several additional functions that can be applied to make the application more intuitive. We will add some of those features later.

Enter data in form

Click the form we just created in the navigation menu.
  1. Go to the Detail section with the many Text fields. To create a new Employee, click the plus in the right top corner of the Detail section to create a new Employee. Fill the following fields. Use your imagination.

    • First name

    • Last name

    • Department

    • Title

    • Standard work hours (week)

    • Salary

    • E-mail address

    • Phone number

    When all the field is filled. press save and update the webbsite. The new Employee is now displayed in the Repeater section.

  2. Create a couple more employees.

Create/Edit Roles

  1. Click the Role administration. entry in the navigation menu.

  2. Override the chosen role in the Edit/New role tab. Give the following specifications.

    Role

    FINANCE

    Description

    Responsible for payments

    Choose the USER role before overriding to ensure we don’t make any mistake in the saving phase that deletes a more valuable role.

  3. Save the new role by clicking Save as new role button.

  4. Editing roles follows the same principle but instead of clicking the Save as new role button, click the Save button.

Set access Form rights

  1. Click the Form rights entry in the navigation menu.

  2. Tick the View box for the FINANCE role in the Employee Overview form.

  3. Click the Save button to set the new access rights.

Create users and assign roles.

  1. Click the User administration entry in the navigation menu. We can now see a list off all the users in our application.

  2. To add a new user, click the Create new user button. Give the new user the following data.

    Username First name Surname E-mail address Phone number

    BOB@TEST.COM

    Bob

    Bobson

    bob@test.com

    +46700000000

  3. When one or more users are marked in the table, the Assign roles and More actions…​ button occurs in the top menu. Make sure BOB@TEST.COM is the only marked user and assign the FINANCE role .

  4. In a regular case, we would send the account details to Bob with the Send account details by mail feature that is found when you click the More actions…​ button. We will ignore that step because Bob is a fictional character.

Configure reports

For extracting data we use Reports. Now we will walk through how to create a report.

  1. Click the Report wizard entry in the navigation menu.

  2. Choose the tables to include in the report. We will choose Employee as the main table. Click next.

  3. Choose the fields to include. We will choose Full name, Department, Standard work hours (week) and Salary. Click next.

  4. Choose which fields and in what order of fields that the report will be sorted. We will choose Full name as first and Salary as second. Click next.

  5. We only want the data from those Employees that has a salary larger than 10000. Therefor we will now add a filter. Do it by selecting Salary and setting the filter to Employee / Salary > 10000. Add the filter and click next.

  6. On this page it’s possible to change the headings in the report. Click next.

  7. We can now choose if the report should be private or open to certain roles. In our case we want to share the report with the FINANCE role. Therefor choose that the report is a Role based report and we put FINANCE in the Current roles section. Click next.

  8. Here we can choose to make the report scheduled. This will generate the report according to the schedule that is set. We will ignore this step by making the report Not scheduled.Click next.

  9. Choose the Report name, Description and Sheet name. Click finish.

Generate report

Now that a report is configured, it’s time to extract the data.

  1. Click the Report manager entry in the navigation menu.

  2. Select the newly made report and click the Run button.

  3. Choose Excel as the format and then click Run report.

  4. Go to the Report queue by clicking the Report- and import queue entry in the navigation menu.

  5. Now we can download the report by just clicking the Excel icon.