Expression builders and calculator allows you to create new fields from preexisting fields. To create these new fields, certain statements should be written to satisfy specie conditions. These conditions are known as conditional statements. There are 2 ways to write these statements (conditional expressions), which is dependent on the conditions being true or false.
1. IF: If the condition is returned true then this word is used
2. ELSEIF: if the first condition is not met, then this is a follow-up statement to give an alternative.
To write these statements, one typically uses operators. There are three types of operators:
1.Arithmetic
2. Logic Operators
3. Comparison
Practical Example in MM Origin
Note: use “” for alphanumerical definitions.
End statement with endif
In this example, we use the Run numbers field to determine the confidence level, i.e. measured, inferred and indicated.
1. File | Edit Data | Calculate |Calculate (Expression)…
2. In the results column, type the new field to be calculated from preexisting fields, and under the input field, click the f(x) symbol
3. In the last column, scroll down and double click the Conditional Expression ‘if-else-if’. This is used when you have more than two conditions to meet. As seen in the green box below, write down the conditions and expressions, followed by using the green checkmark to confirm validity of statement.
4. Open the data table to view results
Want to learn more?
Online Help Manuals - Click here for the latest version
Learning Management System - Click here to login or here to request access
Comments
0 comments
Please sign in to leave a comment.