Using Formula extra field type in qdPM

Using this field type you can calculate value by formula.

There are several ways how it can be used:

  1. Simple use values from other fields
  2. Use PHP math function in formula
  3. Use PHP code to calculate value

1. Simple use values from other fields
Just for example for Projects you  have to have field Profit where Income-Expenses = Profit
Filed Income have ID 99
Field Expenses  have ID 100
Then formula for field Profit will be: [99]-[100]
Numbers in []  are fields ID and they will be replaced by field values.

Value of formula field will be calculated automatically in projects listing and project info page

2. Use PHP math function in formula
Also in formula you can use any PHP math functions.
For example formula string can be: max([99],[100])
So field will display highest value from fields 99 and 100
See all math functions here http://www.php.net/manual/en/ref.math.php

3. Use PHP code to calculate value
For example formula can be:
([100]>1100 ? [100]/2 : [99])

This entry was posted in Version 3.0. Bookmark the permalink.

Comments are closed.


comments powered by Disqus