Perform manipulation or calculations on JSON table fields - 8.x

Perform manipulation or calculations on JSON table fields - 8.x

Overview

This page shows how to use Augments for field manipulation or calculations when using the JSON Table macro, which is part of the Advanced Tables for Confluence app. In this example, we use Groovy scripting to do field modification based on the field data. This is just a simple example of the technique.

Scripting is expensive, so make sure you surround the JSON Table macro with the Cache macro and/or the Future macro to minimize response time for the page. 

Reference 

Macro browser input

Select this macro

Macro name

Advanced Tables - JSON Table

Macro syntax

{json-table}

Define these parameters/values

Macro body

[{a: 1495020217, b: 1495020217.0}]

JSON Table settings > Data settings > Output format

wiki

JSON Table settings > Data format > Augments to data row values

, "{groovy}def x='%1%'; print x.substring(0,10){groovy}"

Column settings > Formatting > Column type (1

2)

MX~YYYY-MM-DD

MX~YYYY-MM-DD

Screenshot

JSON_TableMap_01.jpg
JSON_TableMap_02.jpg

Example result

A

B

A

B

2017-05-17

2017-05-17

Other examples

Visit our full list of product examples for additional inspiration!

Need support? Create a request with our support team.

Copyright © 2005 - 2026 Appfire | All rights reserved.