Skip to content
English
  • There are no suggestions because the search field is empty.

How do I create a calculation script (e.g., duration × hourly cost)?

Create a selection on Reported times, bring in Hourly cost via a selection join to Persons, then add a Calculation script that multiplies Time reported duration by Hourly cost (×24 if duration is stored in days). Finally, add the calculated column to your selection.

  1. Create a selection (Reported times)
  2. Join Hourly cost from Persons
  3. Add a Calculation script (Reported times)
  4. Show the result in your selection

 

Step 1: Create a selection (Reported times)

1. Go to Settings and system settings
2. Go to Selections
3. Click "Add"
4. Choose Job → Reported times
5. Name the selection, then add it to a role and a selection group.
6. Enter a date condition
7. Save and close.

calculation script 5


 

Step 2: Join Hourly cost from Persons

1. In System settings, under Selections choose Table providers.
2. Select the table Reported times,
3. Click "Edit"

Calculation script 6

4. Click "Add" → "Selection join" and fill in:

calculation script 7

  • Column name: Hourly cost (example)

  • Local key column: Time report person

  • Selection to join: Company Persons (a selection showing you persons)

  • Remote key column: Person

  • Remote value column: Hourly cost

  • Function: Any arbitrary value from source

calculation script 2


 

Step 3: Add a Calculation script (Reported times)

1. Go to settings and system settings
2. Go to Table providers
3. Open "Reported times" (double-click or Edit).

 

beräkning ENG 1

4. Click Add → Calculation script

calculation script 9
5. Enter a Name and set Return type to "BankNote"
6. Locate the Column IDs for:

  • Time reported duration

  • Hourly cost (the join column from Step 2)

beräkning ENG 2

beräkning ENG 3

7. In the formula field, enter (replace the IDs with your actual Column IDs):

Table.[DurationColumnID]*Table.[HourlyCostColumnID]*24

 Use ×24, Time reported duration is stored in days and you need hours × hourly cost.

 

Step 4: Show the result in your selection

8. Reopen the selection you created in Step 1. Add the new "calculated column" (the script from Step 3) to the display column.
9. Save and close

Your selection now shows the calculated cost per reported time (duration × hourly cost).

beräkning ENG 4


 

Notes & tips

  • If the hourly cost is missing for some persons, the calculated value will be empty for those rows.

  • Test the full flow in your sandbox before applying it in production.


    Need Extra Help?

    If you prefer assistance with setup or customization, you can purchase coach hours.
    Our experts will help you configure your calculations according to your specific requirements.