This tutorial is for the new, online project designer. The tutorial for the Desktop Designer is available here .

Math Point

Learn how the Math point can be used and see it in action with the sample projects.

What is the Math point?

The Math point is used to process calculations and expressions using data from other points, such as a Boolean , Date/Time , Drop List , Edit , Logic or an Ultradrop point . A Math point is configured with a fixed, mathematical expression which can be used with many mathematical operators and functions to produce a result.

Key Features

  • Provides over 30 mathematical operators and functions.
  • Can perform calculations on session data by importing other points' values into the mathematical expression.
  • Supports any points that have a numeric or code-based value.

Math point animation

Mathematical Operators and Functions

A variety of mathematical operators and functions are listed below, in order of precedence:

Mathematical Operators

Symbol Mathematical Operator
^ Power
* Multiply
/ Divide
& Modulus
+ Add
- Subtract

Conditional Operators

Symbol Conditional Operator
= Equals
!= Not equals
> Greater than
< Less than
>= Greater than or equal to
<= Less than or equal to

Logical Operators

Symbol Logical Operator
& And
| Or
?x:y If/Else conditional statement in the form of (conditional expression) ? (true expression) : (false expression) .
Show More Details

A conditional statement has three parts; the conditional expression , the true expression and the false expression . If the conditional expression is true then the true expression will be evaluated and the false expression will be ignored. If the conditional expression is false then the false expression will be evaluated and the true expression will be ignored.

Example:

If the value of the Edit point EditPoint1 divided by 2 is greater than 5 then evaluate EditPoint1 squared otherwise evaluate EditPoint1 by the power of 3.

((EditPoint1/2)>5) ? (EditPoint1^2) : (EditPoint1^3)

Functions

Symbol Function
abs Absolute
inv Inverse
int Integer
sqrt Square root
log10 Log
ln Natural log
exp Exponential
sin Sine
cos Cosine
tan Tangent
asin Arcsine
acos Arccosine
atan Arctan
deg2rad Convert degrees to radians
rad2deg Convert radians to degrees
irnd Generates a random integer between 0 and x-1 (meaning that there are x possible values).
frnd Generates a random decimal between 0 and x inclusive.

Configuration and Settings

The Math point can be configured in the Mobile Data Anywhere Designer to customise the behaviour of the point. See below for details on each of this point's properties.


Math point web properties

Math Settings

Expression

This is where you can create the expression that will be evaluated by the Math point. The expression should be a mathematical expression and can use any of the available mathematical , conditional and logical operators and functions . These can be inserted manually or can be quickly inserted using the Insert Operator dropdown box below the expression field.

The expression can also contain dynamic references to other points in the project in order to use those points' values in the expression. References can be inserted manually, by using the target point's ID name in the expression or can be inserted automatically using the Insert Point Name dropdown box below the expression field. If a referenced point has a blank value, the value will be treated as zero.

Math point web expression editor

Size

The Size options can be used to customise the width of the Math point.

Decimal Accuracy

This can be used to set the precision of the final value that is stored in the Math point, after evaluating the expression. This includes the following options:

  • Hexidecimal
  • Best
  • Integer
  • 1 digit
  • 2 digit
  • 3 digit
  • 4 digit
  • 5 digit
  • 6 digit

Sample Projects

The Basic Points Sample project contains examples of how to use many of the various points that are available. This project also contains a page that demonstrates some of the ways that this point can be used in your projects.


Sample Projects
You can download the sample project for this tutorial or import the projects directly into your account.

Sample 1: Any Text Allowed Style

In the sample project basic_point_samples.ppc there is a Math Point page which demonstrates a variety of uses for the Math point. Open this project in the Mobile Data Anywhere Designer for a closer at how each point has been customised on each point's properties window.

Math point sample