Appending to google sheets leaves empty cells in between

I have google sheet with following data:

I have a query that read only the A:A column and show that data into the retool table component as follows

I have written a query to add a new value to the Payments Methods Column on the event "New Save"

The value gets updated in the google sheets at A6 but leaves a blank space at A5 mostly because B5 has some value


Here's the query written to add new value

How do I avoid creation of empty cells. Any help is much appreciated.

Hey @Sayuk_Codes!

Retool typically sees each row as a unit, but it looks like the rows in Payment Methods and Expense Category aren't related, is that correct?

This workaround is a bit hacky but something like the following might work if you replace sheets with the query you're using to fetch the data:

It looks for where the next empty cell in the column is based on the data you've pulled into Retool and then manually updates the value there. Does that work?

Thanks for replying.
I understand that each is looked as an entity.

That's why I decided to place both Payment Methods and Expense Category in different sheets.

That saved me from implementing workarounds that may behave unexpectedly at times

1 Like