Specifying third-party macros as Numerical Expression formula parameters is a powerful feature, which allows referencing of any data. One can add a macro, returning data from the databases, from other pages and so on, and Numerical Expression will apply all its calculation abilities to these results.
Using third-party macros as parameters of Numerical Expression is straightforward: you just specify a formula and add a macro as of one of the parameters. Third party will be rendered, i.e. it’s result will be evaluated and used as a formula parameter. So, what you see on the page, when you add a third-party macro, the same text will be sent to the formula.
When third-party macro is rendered, its result is transformed to the plain text, so formatting is omitted. For example, Date picker control shows dates on a small panel, but when this macro is added as a DATEVALUE function parameter, only the text with date value is taken.
Here is a simple example to understand how to add a third-party macro as a parameter:
- Add Numerical Expression macro to the page
- Specify the formula in its body: 20+30
- Save the page and ensure the result is 50 (red star sign is shown in a trial version and disappears on a paid version)
- Open a page editor again and replace 30 with Status macro and specify 70 as Status macro’s Title parameter
- Save the page and you will see 90 as a result
After this simple example you may try to use handier ones, by replacing Staus macro with the ones you want.
P.S. Initially the main purpose of this feature was the using of JIRA Issues macro, but later a special function JIRAISSUECOUNT was implemented to replace it. This function works synchronously and faster than the original macro.