04. PivotTable
https://paper.dropbox.com/doc/04.-PivotTable--BtOc0KCWE5aLETzZxBidD2_TAg-K6KxKuefARctuFoTuI4Z8
04. PivotTable
The PivotTable BlackBox is used to implement a pivot table for reporting purposes, with drag’n’drop functionality.
https://pivottable.js.org/examples/
Parameters
The parameters are as follows:
PivotTable ( json { ; defaultRow ; defaultColumn ; defaultRenderer } )
Parameter | Description |
json | A field containing your JSON text that represents your data object Eg, |
defaultRow | A key from your JSON to use as the initial PivotTable row (optional) Eg, |
defaultColumn | A key from your JSON to use as the initial PivotTable column (optional) “g, |
defaultRenderer | The default rendering form for your pivot table (optional) Eg, |
Example
PivotTable (
"GLOBALS::example_json_pivot" ;
"Gender" ;
"Party" ;
"Horizontal Bar Chart"
)
In order to generate your JSON string, the easiest way is to use the in-built FM JSON functions.
Relationship
This BlackBox is designed for a single record, rather than a found set. So your table occurrence should have a relationship from the current context that matches to only one record.
Reactor knows nothing about your current found set.
If your current context is the record containing the JSON you wish to use as your dataset, create a self-relationship, and use that as the BlackBox parameter(s):
User-uploaded image: image.png
Style Customisations
You can customise the CSS of the portal by using Reactor Core to edit the following CSS document:
You will need to recompile the BlackBox to apply any changes you make.