All Collections

How to do calculations and redirect to a specific Page using logic. Updated over a week ago

There are two (2) ways of using conditional logic in Snackeet.

# 👉 B. To do Calculations and redirect to a specific Page using logic.

⚠️ All calculations and actions will be executed when the user leaves the current page and go forward

• For text

• For number

• For date

## 4. [THEN ] Choose what will be done ( go to, replace, or calculations )

⚠️ If you add several steps in "THEN" they will be executed one after the other in the order.

• Go to

It will allow you to redirect to a page if the condition in the IF is true. You will be able to select any page except the current one.

• Replace ( e.q. give a value to a variable )

• Numerical ( e.q. use arithmetic operator to do calculations.)

⚠️ Calculations are available only for the "number' type

You can realize different types of operations add (+), subtract (-), multiply (x), divide(/), power(^) and root

1. Operation with a number

For example, if you want to add 10 to a variable called var1,

> Select "add" > "Enter an number" > give a value ( 10 ) > to var1

2. Operation with an another variable

For example, if you want to add the value of a variable called var2 to a variable called var1,

> Select "add" > Select var2 > to Select var1

so in that case assuming var2 = 10 and var1 = 5

the new value of var1 will be var1 = 15

## 5. [Multiple IFs] Add another "IF" condition

You can set several IFs.

Note that ALL "Operations" and "Replace" have the same level of priority and will be executed in their line order in ALL FULFILLED conditions

"Go to" will be executed only once for the first fulfilled condition AFTER ALL "Operations" and "Replace" actions.

We recommend keeping your conditions as simple as possible.

## 5. What is default settings

"In ALL other cases redirect by default Settings." means that if no conditions are fulfilled it will use the default redirection that you can set at the bottom of any page.

Related article