CheckFirst
  • CheckFirst
  • Get started
    • Tutorials
      • Yes/No
      • Quiz
      • Constants table
      • Date calculator
      • Complex example
    • Logic Syntax
  • Features
    • Questions
    • Constants
    • Logic
      • Calculator logic
      • Conditional logic
      • Date logic
      • Map constant
      • Results formatting
    • Settings
  • FAQ
    • Full Logic Syntax List
  • Contact Us
  • Updates
Powered by GitBook
On this page
  • When should I use this template?
  • Template walkthrough
  • Context
  • Step 1: Set questions
  • Step 2: Set constants
  • Step 3: Map constants table to radio question
  • Step 4: Set calculation logic
  • Step 5: Preview

Was this helpful?

  1. Get started
  2. Tutorials

Constants table

This checker makes use of a constants table, where the import duty of liquors are calculated based on fixed rates. This example is modelled after the tax on intoxicating liquors from customs.gov.sg.

PreviousQuizNextDate calculator

Last updated 3 years ago

Was this helpful?

When should I use this template?

When you have a list of items with prices/rates/numbers associated with each item.

Template walkthrough

Context

We want to check what is the total duties payable for an alcoholic product with duty rates based on per litre of alcohol. The formula (as taken from ) is as follows:

Duties payable = Duty rate x Total quantity in litres x Percentage of alcoholic strength

Step 1: Set questions

In the questions tab, since we have <5 options, we'll use aradio question to set the alcohol choice, andnumber questions to find out the quantity and alcohol strength. Here's what it should look like:

Step 2: Set constants

The rates of each alcohol type is as below:

Alcohol

Duty rate

Stout

$60 per litre of alcohol

Whiskies

$88 per litre of alcohol

In the constants tab, let's create a new constant table. The Reference will be the alcohol name, and the Constant will be the duty rate. Ensure your Reference is an exact match to the radio option.

Step 3: Map constants table to radio question

We need to manually map the constant table to the respective radio question. This helps associate a constant to a radio option.

Step 4: Set calculation logic

O1*N2*(N3/100)

Step 5: Preview

Let's Save draft then Preview our checker.

Create amap constant logic block and choose the question and constant table from the dropdown

Hide the block so that it wont appear in the results section

Following the formula from before, let's create acalculated result and put in our inputs.

Duties payable = Duty rate x Total quantity in litres x %Percentage of alcoholic strength

Learn more about constants
customs.gov.sg