[OutSystems Data Grid] Create grid with dynamic number of columns based on restURL
Reactive icon
Forge component by Gonçalo Martins
Application Type


I have a traditional Outsystems app that I want to rebuild in a reactive app. One of the screens contains a grid which is fed by the JSON of a RestURL.

In the traditional app I use the "RestURL" property with the property "autogenerated columns" set to true.

The result of the restURL is a dynamic JSON, so it cannot be deserialized into a structure, because the structure attributes change daily (sometimes there are 20 attributes, sometimes 30,...).

I wanted to test out the datagrid in the reactive app, but I'm not able to feed the grid because my input is dynamic.

the "Data" property in the reactive Datagrid doesn't allow a restURL, nor did I see a property called "restURL". If i use the "ArrangeData" in a DataAction, it wants to have structured data, but I'm not able to provide that because the JSON is always different.

Is there a way I can get this to work in the reactive app? In the traditional app it works perfectly.

Thanks in advance!


Hello @Shirley Grenelle 

In order to achieve this you can try to consume that rest API in your module and then use the output to fetch the Grid.
For autogenerated Grids you can't receive JSON directly since it requires some metadata and that's why the ArrangeData server action exists since the main focus of this component is to provide the low code experience of using column blocks (with all the power of customization and avoiding the burden of maintaining your own javascript code).


Hi @Gonçalo Martins

Thank you so much for your quick reply!

I tried this as well, but the output has to be defined when consuming the rest API.

If I set the response format to JSON, the datatype of the response needs a structure (which I'm no able to give, because of the changing attributes).

If I set the response format to text and the datatype of the response to text, and then use the ArrangeData, I I then set the output of the DataAction to text and I use this in the grid in the Data property, I get this error: " Failed to parse response of the method"

Is there another way to consume a dynamic json so I can get it to work in the grid?



Hi @Shirley Grenelle 

Please share a sample oml where I can try to take a look at that so that I'm able to better find a possible solution.


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