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.

When should I use this template?

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

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 customs.gov.sg) 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.

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

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

Step 4: Set calculation logic

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

O1*N2*(N3/100)

Step 5: Preview

Let's Save draft then Preview our checker.

Last updated

Was this helpful?