Hello all,
I'm begining with building App with retool, and I want to add a little bit more complexities to my first app.
Basically, I have a table with multiple accounts: Acc1, Acc2, Acc3, ...
I use an API request to collect data from these accounts. POST request?account=Acc1
For the moment it's only possible to select 1 account in the table, so when I click on the button the request runs for the selected account.
Now, I want to be able to select more than 1 account, and then run as many POST requests as selected accounts.
I think I should use a JS query to create this loop like this
nb_acc = number of selected account
Loop from 1 to nb_acc
POST request?account=acc[i]
But I'm a bit lost in how to use JS to create this loop.
Is there a no-code way to do it or not?
When I'll be ready with this, I'd like to add more and more complexity, by adding another loop in this first loop with another parameter 🫣
@Pierrick81 You should be able run a query to select all accounts from the your db...
select * from yourtable where account IS NOT NULL or
select * from yourtable where account != ''
And then once you have that result you can iterate through it in a couple of ways, but let's start there... more information will help. (screenshots, etc.)