I have deleted the set up cos I found a way around that. But what I did was create a table component with rows serial, item cost per item and quantity. The JS query add the number of rows to table1. Columns in the table are editable (except the one I set as pk)
Ahh I see. JS queries are interesting because there's a lot to you can do to generate id's. For instance Retool comes with the uuid library built in, so you can use uuid.v4() to generate an id. How you actually want to do it depends on how you have your DB set up though.
Glad to hear you were able to find a workaround and thanks for sharing!