Hi all.
Javascript noob question. Often, I have a table, and I want to extract a small part of it, and show it in another table. Example use case: I have a csv file loader that then runs a db view to match the inputs to a reference table. There may be some rows that don't have a match; I want to pull out those rows, and pull out a single column for the row identifier
I'm using the table output as my input to a new table. This little bit of code generates an array but it won't populate the table:
{{
formatDataAsArray(
table4.data)
.map(x => x.Auto_row_id)
}}
Is there a very easy Retool method or something I can apply to make this suitable as a table input?
I can use (I think?) object destructuring although I don't really understand how it works. Also, if you have column names with spaces it it gets complex quite quickly, all this for one column. There are a lot of brackets in a pretty small UI for anyone else to follow. Of course I can put it in a transformer, but ideally would just keep it in the table def.
{{
formatDataAsArray(table4.data)
.map(
({['GL Account']:gl_account}) =>
({['GL Account']:gl_account})
)
}}
If there's a simpler way it would be great to know. Thanks!