Hi,
I've a scenario where I'm connecting to a SaaS app which contains different worksheets of data (like spreadsheets). Each worksheet might have different numbers of columns and different column types, but ultimately I simply want to represent them in a Retool table component.
The SaaS app has an API and I have returned the worksheet data and distilled down to a simple JSON object (where the columns are defined along with the rows) - example of a worksheet that contains company details:
{
"columns": [
"RefCode",
"Name",
"Address Country"
],
"rows": [
{
"RefCode": "123456",
"Name": "ABC Inc.",
"Address Country": "GB"
},
{
"RefCode": "789456",
"Name": "DEF Corp.",
"Address Country": "GB"
}]
}
The new table component has no problems in displaying this, however the challenge is that it likes you to define the structure during design, and I don't know what the structure will be as it will depend on which worksheet is selected.
Is there a way of the table component effectively regenerating columns dynamically as you trigger query updates (as I move between selecting different worksheets)?
Appreciate any help or advice you can give.
Thanks
Dave