Attempting to build out a form and provide query that will load content from a selection in a table.
When posting the query into the Initial Data field, I get:
I'm unsure how to change this from string to object....
Attempting to build out a form and provide query that will load content from a selection in a table.
When posting the query into the Initial Data field, I get:
I'm unsure how to change this from string to object....
Retool has a formatDataAsObject
method, so something like: formatDataAsObject(table1.selectedRow.data)
More detail here:
@kevinl Welcome to the forum
Try wrapping the table1.selectedRow.data in formatDataAsObject( table1.selectedRow.data )
Thanks for the replies!
So, the original code in the tutorial I was using ( Create forms using the Form component (retool.com)) and modifying to my needs showed that Initial Data needed to be:
{
{
table1.selectedRow.data ? table1.selectedRow.data : null;
}
}
after I played around with it, the following actually worked:
{{ table1.selectedRow.data ? table1.selectedRow.data : null }}