Blog

Conditions

Posted by:

You are here:
< Back

Introduction

You can create conditions using an structure like this

if(comparison)
{
  return value
}

or if you prefer you can use a shorter structure like this:

if(comparison)
    value

Replace “comparison” with the comparison you want and “value” with the value that need to be used, example:

In this condition if field 1 has a value less than 10 the value ‘1’ will be used by this formula

You can use multiple if conditions in the formula, like in this example

If Field 1 is less than 10 the formula will use ‘1’ if Field 1 is less than 30 it will use 2, otherwise it will use 3

Type of comparissons

You can use these comparisons

ComparisonNameExample
>Greater thanif(10>20)
>=Greater or equal thanif(10>=20)
<Less thanif(10<20)
<=Less or equal thanif(10<=20)
==Equal toif(10==20)
!=Not equal toif(10!=20)
containsContainsif(“Hello word” contains “word”)
not containsNot Containsif(“Hello word” not contains “word”)

0

About the Author:

Im programmer working for an international company. I have programmed since i was 12 and i have done it professionally for 6 years. Programming for a company is fun and i have learned a lot of things but i have always been interested in running my own business so i decided to give it a shot doing what i do best, programming stuffs.
  Related Posts
  • No related posts found.