Submit from listview

Hello all,

I am using the listView component that displays data from my retool DB query. The retool DB query can return 1 or more responses so the list length always changes. Inside I have a currencyInput component and I want to be able to enter different amounts in all currency inputs associated with the response from the retool DB query, and then submit them all as an array into my Retool DB.

From what I can tell, I need to store all the separate currency inputs as a variable on an event change and then once done I update the variable array into my db. But when I try I keep overwriting the variable. From what I have read, I need to maybe use old listView component but I want to know if I can use the new listView component. I also read online and I think I need to use the setIn feature but I wasn't sure.

In the screenshot below, you can see my listView and inside I have the currencyInput. How can I store all of the currencyInputs into variable2 ? In the case of the screenshot, variable2 should be ["3","5","7"]

Thanks,

I noticed at your screenshot you did not have event handler attached to your currency input component.

This event handler would be responsible for writing data into temp variable every time currency input changes.

I'm attaching screenshot with that event handler configuration.

Kudos to this post.

2 Likes

Worked like a charm! Thanks so much!!