Is there a way to make a dynamic table through JSON input (JSON Data & Config file) ?
Question
Application Type
Reactive

I want to make a dynamic table using JSON data and a JSON configuration file. 

Configuration file:

[

{

headerText: "XYZ",

accessor: "Apple",

style: {

textTransform: "capitalize",

align: "center",

},

cellType: "alpha-numeric",

sortable: true,

Cell: (cellData) => {

return moment(cellData.original.Apple).format(

"YYYY-MM-DD HH:mm:ss"

);

},

},

{

headerText: "Area",

accessor: "area",

style: {

textTransform: "capitalize",

align: "center",

},

cellType: "alpha-numeric",

sortable: true,

}]

JSON data:

[{"Apple":"2021-11-14T20:00:00.000+00:00","area":"Raw Coal"},{"Apple":"2021-11-14T20:00:00.000+00:00","area":"Secondary"}]


Final output:

In the form of a Table (Completely dynamic - Self Adjustable rows/columns/Headers/data etc) !!


How should I do it in Outsystems (Easy & authentic way) ??

Champion

Hi Sahil,

Check this documentation about Data Grid Reactive and this sample.

You can also use JavaScript to convert to HTML

Regards,

Pedro Costa

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.