PANTHEON™ manual

 Categories
[Collapse]User Manual for DataLab PANTHEON 5.5
 [Expand]End-User License Agreement
  Uvodna beseda
 [Expand]PANTHEON Editions
 [Collapse]Getting Started
  [Expand]Instructions for Ensuring Compliance of PANTHEON 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]Main Menu
   [Expand]Input Elements
   [Expand]Toolbar
   [Expand]Taskbar
   [Expand]Keyboard Shortcuts
    Wildcard Characters
   [Collapse]Formulas
     Using Conditional Statements in 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
 No formula defined!
[Expand]Datalab PANTHEON 5.5 Guide
 Opening or closing round bracket missing!
 Debugging Formulas
[Expand]Testing and Debugging Formulas
 Opening or closing square bracket missing!
 Conditional statement at position x not enclosed in square brackets!
 Syntax error in conditional statement. Correct syntax is [condition:value]
 Adjacent operators (xx)!
 Last character of the formula is an operator!
 Variable not enclosed in hashes (#)!
 Illegal characters: xyz
 Unknown error!
[Expand]User Manual for Datalab PANTHEON Farming
[Expand]User Site
 Adjacent hashes!
 The line number must be an integer (#xx#)!
 The first character of #xx# must be a transaction type or a column mark!
 The first character of #xx# must be an operation type (R, S, O or A)!
 The second character of #xx# must be a transaction type (D, K, S, P, or O)!
 Variable not defined
[Expand]Kralicek Quicktest Financial Ratios

Load Time: 421.8975 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!