PANTHEON™ manual

 Categories
 Скласти тех карту
[Collapse]User Manual for DataLab PANTHEON 5.5
  End-User License Agreement
  Uvodna beseda
 [Expand]PANTHEON Editions
 [Collapse]Getting Started
   Instructions for Ensuring Compliance of PANTHEON with SAS
   Ensuring Your Data Is Compliant with SAS
  [Expand]Installation of PANTHEON and Required Components
  [Expand]PANTHEON Help
  [Collapse]PANTHEON Basics
    Print Help Topics
    Help Elements
    Glossary
   [Expand]Window Elements
   [Expand]Input Elements
   [Expand]Main Menu
   [Expand]Toolbar
   [Expand]Taskbar
   [Expand]Keyboard Shortcuts
    Wildcard Characters
   [Collapse]Formulas
     Using Conditional Statements in Formulas
    [Expand]Testing and Debugging Formulas
    Print Setup
    Filtering and Sorting
    New Record
    Insert Image
    Delete Record
  [Expand]Assigning Identifiers
  [Expand]Materials and Goods Movements
  [Expand]ZEUS Business Intelligence System
 [Expand]Settings
 [Expand]Orders
 [Expand]Accounting with Goods and Materials
 [Expand]Value-Added Tax
 [Expand]Service
 [Expand]Customs Warehouses
 [Expand]Financials
 [Expand]Personnel
 [Expand]Manufacturing
[Expand]Datalab PANTHEON 5.5
 90632
[Expand]Pantheon RA (android POS) guide
[Expand]Довідник користувача Datalab PANTHEON Farming
[Expand]User Site

Load Time: 459,2014 ms
print   |
Label

Using Conditional Statements in Formulas

Using Conditional Statements in Formulas

Using Conditional Statements in Formulas

010379.gif010380.gif010381.gif010411.gif010382.gif010383.gif

Formulas can contain conditional statements with the basic syntax 'if A is true, then B'. Such statements are enclosed in square brackets.

[condition:value] - if condition is true, the value is returned.

Conditional statements can be grouped:

[condition1:value1] [condition2:value2] [condition3:value3] value4

The above formula is parsed in the following way:

  • if condition1 is true, the result is value1, else
    • if condition2 is true, the result is value2, else
      • if condition3 is true, the result is value3, else
        • the result is value4 (if none of the above is true)

 

Examples:

#MPCENA# * 0.75
multiply the retail price by 0.75
#PRFAKTOR# * #PRURE#
multiply factor from report with corresponding reported hours
[#KOL# > 100:#MPCENA#*0.8] #MPCENA#
if quantity is greater than 100, the price equals MPCENA - 20%. But, if the condition is not met (that is, of quantity is less or equal to 100), the price equals MPCENA.

 

000001.gif To use the operators 'less than or equal to' and 'greater than or equal to' (not directly available in PANTHEON), use two conditional statements!

Example:

If A is greater than or equal to B, return 0, else return 1.

would be expressed as

[A>B:0] [A=B:0] 1




Rate this topic
Was this topic usefull?
Comments
Comment will also bo visible in forum!