Summary
Provides information about numbers.
Details
| Name: |
Number Supplier |
| Prefix: |
number (optional) |
| Supported Content: |
Numbers |
| Provided By: |
Reporting Plugin, from version 1.3 |
Keys Supported
The following are the list of keys which this supplier will return a value for.
| Key |
Content Types |
Return Type |
Description |
| type | Numbers | Text | The name of the number type (Integer, Double, etc). |
| is whole | Numbers | Boolean | Returns true if the number is a 'whole' number, or an integer. That is, it does not have any decimal places. |
| is decimal | Numbers | Boolean | Returns true if the number has a decimal point. |
| is nan | Numbers | Boolean | Is true if the current value is not a valid number. (Since 2.0.0) |
| + [X] | Numbers | Number | Adds X to the current value. Eg "my:value > +10". (Since 2.0.0) |
| - [X] | Numbers | Number | Subtracts X from the current value. Eg "my:value > -5.6" (Since 2.0.0) |
| * [X] | Numbers | Number | Multiplies the current value by X. Eg "my:value > *2.5" (Since 2.0.0) |
| / [X] | Numbers | Number | Divides the current value by X. Eg "my:value > / 2.5". (Since 2.0.0) |
| mod [X] | Numbers | Number | Outputs the 'mod' value of two numbers. Eg, if "my:value" is currenlty 5, "my:value > mod 3" will return "2". (Since 2.0.0) |
| equals [X] | Numbers | Boolean | Compares the current number with the supplied number. Eg "my:value > equals 5". (Since 2.0.0) |
| less than [X] | Numbers | Boolean | Is true if the current number is less than X. Eg "my:value > less than 100". (Since 2.0.0) |
| greater than [X] | Numbers | Boolean | Is true if the current value is greater than X. Eg "my:value > greater than 1.5". (Since 2.0.0) |
| number format | Numbers | Text | All other values are interpreted as formatted numbers. Eg:
"#,##0.00" will return a text string with at least one value before the decimal point, two after, and every 3rd digit will have a comma separator. |
Related Suppliers
Attachment Supplier,
Collection Supplier,
Comment Supplier,
Content Supplier,
Date Supplier,
Label Supplier,
Report Supplier,
Request Supplier,
Scaffold Data Supplier,
Text Supplier,
Tracking Data Supplier,
User Supplier
Updated by Joseph Nolte
Jun 24, 2008 08:22
Nevermind. I realized I dont have version 2.0.0
Hi. I want to generate the number of descendents to the home page that have a certain data variable "IsEntry". I used this:
{report-block} {local-reporter:content:descendents|type=page} {text-filter:data:IsEntry|required=true} {local-reporter} {report-info:content:descendents > size} {report-block}However, I realize that all this is doing is getting the number of descendents. Is there a way to do something like:
{report-info:content:descendents > data:IsEntry > true > size}IsEntry was created by the {set-data} macro.
Thanks
Unfortunately, that kind of reporting is something that isn't easy to do currently. Hopefully we'll have time to address it for the next major version. The only way at present is to use the report-table macro with an empty report-column and use the 'summary' property. Not exactly elegant or attractive...
In a report table I am trying to report a link to a specific version of a page
e.g.
{report-info:content:version history > 7}The version number is passed in by a number-data on the page being reported on
As the version history n starts as newest first I need to revers the version number
I have tried several different methods but can't get anything to work.
The nearest I would expect to work would be
{report-column:injected=true|title=Calculate} {report-info:content:version history > %version history > size% > - %data:version% } {report-column}The following work fine
{report-column:injected=true|title=data version} {report-info:content:version history > %data:version% } {report-column} {report-column:injected=true|title=version history size} {report-info:content:version history > %version history > size% } {report-column}Any suggestions?
Hmm. Tricky one. The best option, of course, would be to add a function to Content Supplier so that you can just request the specific version directly. Definitely worth a feature request.
In the meantime, try one of these:
Option 1
{report-table} {local-reporter:content:children} {text-sort:content:title} {local-reporter} {report-column:injected=true|title=Calculate} {report-on:injected=true} {report-info:content:version history > %%version history > size > - %data:version% > +1%% > title|link=true}{report-on} {report-column} {report-table}Option 2:
{report-table} {local-reporter:content:children} {text-sort:content:title} {local-reporter} {report-column:injected=true|title=Calculate} {report-block} {local-reporter:version history} {number-filter:version|minValue=%data:version%|maxValue=%data:version%} {local-reporter} {report-body}{report-info:title|link=true}{report-body} {report-block} {report-column} {report-table}