# Multiple varying INSERT command

**URL:** <https://forum.adalo.com/t/multiple-varying-insert-command/2536>\
**Category:** Get Help\
**Created:** [July 15, 2020, 6:02am UTC](https://forum.adalo.com/t/multiple-varying-insert-command/2536 "2020-07-15T06:02:11Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![vjragavan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/vjragavan/32/1285_2.png) [@vjragavan](https://forum.adalo.com/u/vjragavan)\
**Post date:** [July 15, 2020, 6:02am UTC](https://forum.adalo.com/t/multiple-varying-insert-command/2536/1 "2020-07-15T06:02:11Z")

</div>

Hey folks,  
I want to INSERT multiple records with one action (button tap).

My use case is - A user has many profiles. Each profile can have many tasks assigned.

I want to add a task to a profile. But if the user chooses (via radio button) to add that particular task to all profiles related to their account, they should be able to. But this requires firing off multiple INSERT actions.

I am not sure how to perform a variable number of INSERT actions for a button push. Any help is much appreciated.

---

<div class="post-metadata">

**Author:** ![bibipac](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/bibipac/32/786_2.png) [@bibipac](https://forum.adalo.com/u/bibipac)\
**Post date:** [July 15, 2020, 7:54am UTC](https://forum.adalo.com/t/multiple-varying-insert-command/2536/2 "2020-07-15T07:54:17Z")

</div>

I think “bulk” modif are not implemented (yet) in Adalo, i.e. you cant delete various records at once…so within Adalo, this is not possible…\>\> you’d need external tools

---

<div class="post-metadata">

**Author:** ![karimoo](https://avatars.discourse-cdn.com/v4/letter/k/ad7895/32.png) [@karimoo](https://forum.adalo.com/u/karimoo)\
**Post date:** [July 15, 2020, 1:20pm UTC](https://forum.adalo.com/t/multiple-varying-insert-command/2536/3 "2020-07-15T13:20:31Z")

</div>

@vjragavan Hi Vijay, can you model it in a collection like:  
profile has tasks,  
user has profiles, etc.

Or is it to diverse?

---

<div class="post-metadata">

**Author:** ![vjragavan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/vjragavan/32/1285_2.png) [@vjragavan](https://forum.adalo.com/u/vjragavan)\
**Post date:** [July 15, 2020, 2:07pm UTC](https://forum.adalo.com/t/multiple-varying-insert-command/2536/4 "2020-07-15T14:07:13Z")

</div>

It is modeled like that only. I’m not sure how to get other profiles associated with the current user. Even if I get the list of users, how can I call n number of INSERTs?

---

<div class="post-metadata">

**Author:** ![karimoo](https://avatars.discourse-cdn.com/v4/letter/k/ad7895/32.png) [@karimoo](https://forum.adalo.com/u/karimoo)\
**Post date:** [July 15, 2020, 2:14pm UTC](https://forum.adalo.com/t/multiple-varying-insert-command/2536/5 "2020-07-15T14:14:26Z")

</div>

If you can model it in collections, can you do an CSV upload after filling it in Excel? Could be a manual one time or automated with Zapier etc.

---

<div class="post-metadata">

**Author:** ![vjragavan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/vjragavan/32/1285_2.png) [@vjragavan](https://forum.adalo.com/u/vjragavan)\
**Post date:** [July 15, 2020, 2:21pm UTC](https://forum.adalo.com/t/multiple-varying-insert-command/2536/6 "2020-07-15T14:21:36Z")

</div>

TBH, that went over the head for me. If you don’t mind, can you explain it to me? 🙂

---

<div class="post-metadata">

**Author:** ![karimoo](https://avatars.discourse-cdn.com/v4/letter/k/ad7895/32.png) [@karimoo](https://forum.adalo.com/u/karimoo)\
**Post date:** [July 15, 2020, 2:37pm UTC](https://forum.adalo.com/t/multiple-varying-insert-command/2536/7 "2020-07-15T14:37:32Z")

</div>

I was just brainstorming for workarounds to simulate mass inserts, which could be done by uploading CSV to the database tables.  
But actually I don’t have enough information to understand the data model behind it.  
You wrote:

> [@vjragavan](#):
>
> A user has many profiles. Each profile can have many tasks assigned.

I don’t understand the background, why you need to update all profiles when a user selects a task to be added.

---

<div class="post-metadata">

**Author:** ![vjragavan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/vjragavan/32/1285_2.png) [@vjragavan](https://forum.adalo.com/u/vjragavan)\
**Post date:** [July 15, 2020, 2:59pm UTC](https://forum.adalo.com/t/multiple-varying-insert-command/2536/8 "2020-07-15T14:59:01Z")

</div>

Let’s say, I am creating an activity tracker for a family.

When I want to add “drink 2L of water” to one profile, I want to be able to add it to all family members.

I own the account, but each family member will have their profiles, and each profile can have their own activities and few common ones too. Hope this use case is making it clear.

---

<div class="post-metadata">

**Author:** ![bibipac](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/bibipac/32/786_2.png) [@bibipac](https://forum.adalo.com/u/bibipac)\
**Post date:** [July 16, 2020, 6:24am UTC](https://forum.adalo.com/t/multiple-varying-insert-command/2536/9 "2020-07-16T06:24:41Z")

</div>

hmm, I still think this is not possible in Adalo - as of now…

in other DB like SQL you could write stuff like,  
Select all users in Table family and add 2 to field water  
… and Bam, in a second this would update 10.000 records at once…!  
This is a CPU/RAM Server intensive op. more if you have 1 million records.

In Adalo, this “feature” does not exist., you would have to manually clic (i.e. with a button on a form) on each line of records to add 2 litters to their field “water”…

- to add, substract or divide.

(\*someone correct me if i 'm wrong about this event)

…or use some third party App of Adalo to do that for you.  
Its just a Way to preserve/minimize DB CPU resources…for now

---

<div class="post-metadata">

**Author:** ![vjragavan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/vjragavan/32/1285_2.png) [@vjragavan](https://forum.adalo.com/u/vjragavan)\
**Post date:** [July 16, 2020, 10:53am UTC](https://forum.adalo.com/t/multiple-varying-insert-command/2536/10 "2020-07-16T10:53:33Z")

</div>

> [@bibipac](#):
>
> in other DB like SQL you could write stuff like,  
> Select all users in Table family and add 2 to field water  
> … and Bam, in a second this would update 10.000 records at once…!

Yeah, that’s exactly what I’m not sure of. Even if my collection is from Airtable, I don’t know if we can perform something like this even with the help of Adalo + Zapier or Integromat.

---

<div class="post-metadata">

**Author:** ![bibipac](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/bibipac/32/786_2.png) [@bibipac](https://forum.adalo.com/u/bibipac)\
**Post date:** [July 17, 2020, 6:39pm UTC](https://forum.adalo.com/t/multiple-varying-insert-command/2536/11 "2020-07-17T18:39:56Z")

</div>

i don t use those tools (yet!!)  
there are others here that do and probably can answer

…as for updating in bulk, check this video, that s what Sean Tierney could do with a tool called Katalon…not free 🥶  
[Bulk records modifications with Katalon](https://www.youtube.com/watch?v=nEna3y5dhx4&feature=youtu.be)

---

<div class="post-metadata">

**Author:** ![vjragavan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/vjragavan/32/1285_2.png) [@vjragavan](https://forum.adalo.com/u/vjragavan)\
**Post date:** [July 18, 2020, 5:06pm UTC](https://forum.adalo.com/t/multiple-varying-insert-command/2536/12 "2020-07-18T17:06:35Z")

</div>

The use case you suggested (bulk delete) is different. Thank you though.

---

<div class="post-metadata">

**Author:** ![bibipac](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/bibipac/32/786_2.png) [@bibipac](https://forum.adalo.com/u/bibipac)\
**Post date:** [July 18, 2020, 6:01pm UTC](https://forum.adalo.com/t/multiple-varying-insert-command/2536/13 "2020-07-18T18:01:39Z")

</div>

True, and deleting is most always much more simple than doing insert or modify… but if you find a free “way” to do that you can share here. ✌

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/system/32/40401_2.png) [@system](https://forum.adalo.com/u/system)\
**Post date:** [July 28, 2020, 6:01pm UTC](https://forum.adalo.com/t/multiple-varying-insert-command/2536/14 "2020-07-28T18:01:41Z")

</div>

Closed on July 28, 2020, 6:01pm UTC

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
