Flexible table component / Pivot Table

While I’m burning the midnight oil, I’m trying to figure out how to do some performance reporting. The data side is easy, I can eventually get it into a displayable format, but short of stacking text fields in an array or doing some trick with the listview iterating through an array, I can’t figure out a good way (given the current tools) to do something like this:

chrome_2019-09-05_02-30-35.png

Having a true pivot table would be terrific but until then having some type of more robust layout for row/column data, like a column component that’s just iterates for a given array for x number of values. You could stack them side by side in a container and assign each of them a different array.

Good question! This is something we should really improve. Right now the strategy is to just drag on a 4x4 of TextInputs. @alex — do you want to add this to our spreadsheet as well? Thanks!

In the meantime, I think I can hack something together by building an object of arrays and iterating over them in listview with the index. I can build the conditional formatting in by concatenating the html to be in the value.

@blue-coat-atc thanks for the feedback here! Adding some kind of pivot solution is on our upcoming roadmap. There is also an undocumented feature of AlaSQL (the library we use to power the Query JSON with SQL resource) that allows you to pivot, but it’s a bit touchy right now.

Tables are such an important component of any data-based tool, that I suspect it’s the core of every Retool app, as well. At the risk of recreating too much of what Excel does, I would certainly welcome the introduction of a more powerful table component. There are a few in the React ecosystem, that are quite powerful and could be extended if necessary.

Apologies for the bump, but I was about to ask something similar when I found this. Is the 4X4 of textinputs still the best strategy?

If so, I’ll add my +1 for this - retool is great for workflow, and I’d love to use it for reporting too. This is easily the biggest missing feature stopping me from doing so.

1 Like