Skip to main content

Bonus Exercise 1.1: Create the Calculations

  1. Navigate back to your App Home screen if you are not currently on it, then click the Travel request table to open table builder
  1. Click the Forms button to get to form builder
  1. Click Add a field in the table
  1. In the pop-up, enter Travel days in Column label, and change Type to Integer. Leave the auto-populated field under Column name
  1. Click Add
  1. Click Add another one
  1. Enter Estimated trip cost in Column label, and change Type to Decimal. Leave the auto-populated field under Column name
  1. Click Add
  1. Click Done
  1. You should notice now on the left sidebar two form elements highlighted with a purple left border. These are your new fields you added
  1. Drag and drop the Travel days and Estimated trip cost form elements onto your form
  1. Click Save
  1. Click the Travel days form element
  1. On the rightside bar, you should see the options change
  1. Click Formula
  1. Click Add
  1. In the pop-up Formula box, enter the following formula:

    TIMEDIFF(return_date,departure_date)

  1. Click Submit
  1. On the top right, click Save
  1. Click Estimated trip cost
  1. Click Formula, then Add
  1. In the pop-up Formula box, enter the following formula:

    SUM(estimated_airfare,MULTIPLY(travel_days, 150))

info

Our formula here takes into account that each travel day, the employee is given $150 per diem

  1. Click Submit
  1. On the top right, click Save