# Add multiple rows based on a form entry

**URL:** https://community.glideapps.com/t/add-multiple-rows-based-on-a-form-entry/60814
**Category:** Ask for Help
**Created:** [April 21, 2023, 11:32pm UTC](https://community.glideapps.com/t/add-multiple-rows-based-on-a-form-entry/60814 "2023-04-21T23:32:57Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Matty\_Fenny](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/matty_fenny/32/39419_2.png) [@Matty\_Fenny](https://community.glideapps.com/u/Matty_Fenny)
#### Post date: [April 21, 2023, 11:32pm UTC](https://community.glideapps.com/t/add-multiple-rows-based-on-a-form-entry/60814/1 "2023-04-21T23:32:57Z")

</div>

Hi,

My app is a field engineer jobsheet app whereby I create jobs for my engineers and they can fill out a jobsheet etc whilst carrying out work on vehicles in the field.

I have came into a situation where I may be getting a customer that has 75 vehicles that need doing.

How I create a job at the minute is:

- Press add Job
- Fill out the details in a form
- Submit.

This then creates a unique job number (Previous job number +1) and adds a row to my job tab. All works perfectly.

So what I am looking to do is set an amount of jobs for a customer. For example:

- Press add job
- Fill out form (including an ‘amount of vehicles’ entry)
- Submit
- Multiple rows added based on the entry of ‘amount of vehicles’, with their own extension of the job number… i.e

0001/1, 0001/2, 0001/3, 0001/4 and so on.

I hope that makes sense.

An alternative would be to create one job as usual, then when going into that job once created there is an option to duplicate. But again i would like a way to set an amount and it adds them for me with the /1, /2, /3 etc.

Thanks for reading.

Matt.

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [April 21, 2023, 11:47pm UTC](https://community.glideapps.com/t/add-multiple-rows-based-on-a-form-entry/60814/2 "2023-04-21T23:47:22Z")

</div>

When you don’t have a number of vehicles to add, would it be just “0001”?

Would you ever delete a vehicle from the list? What would happen when you delete, let’s say “0001/2”? I assume “0001/3” and “0001/4” stays put? And if you have the ability to add more to that it would be “0001/5”?

---

<div class="post-metadata">

### Author: ![Matty\_Fenny](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/matty_fenny/32/39419_2.png) [@Matty\_Fenny](https://community.glideapps.com/u/Matty_Fenny)
#### Post date: [April 21, 2023, 11:58pm UTC](https://community.glideapps.com/t/add-multiple-rows-based-on-a-form-entry/60814/3 "2023-04-21T23:58:39Z")

</div>

> [@ThinhDinh](#):
>
> When you don’t have a number of vehicles to add, would it be just “0001”?

Yes so I have an automatic system that increments by 1 when adding a new job.

> [@ThinhDinh](#):
>
> Would you ever delete a vehicle from the list? What would happen when you delete, let’s say “0001/2”? I assume “0001/3” and “0001/4” stays put? And if you have the ability to add more to that it would be “0001/5”?

Needing to remove a vehicle is a possibility, and yes the 0001/3 and 0001/4 will stay put.

---

<div class="post-metadata">

### Author: ![Matty\_Fenny](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/matty_fenny/32/39419_2.png) [@Matty\_Fenny](https://community.glideapps.com/u/Matty_Fenny)
#### Post date: [April 22, 2023, 1:36am UTC](https://community.glideapps.com/t/add-multiple-rows-based-on-a-form-entry/60814/4 "2023-04-22T01:36:38Z")

</div>

Theres always the easy option of duplicating the rows and adding the /1 /2 /3 etc but there will be people booking jobs in that dont have access to that.

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [April 22, 2023, 3:15am UTC](https://community.glideapps.com/t/add-multiple-rows-based-on-a-form-entry/60814/5 "2023-04-22T03:15:58Z")

</div>

What are the maximum number of rows you might need to create?  
If it’s (say) around 5 or less, then the simple solution would be to use an onSubmit action with multiple conditional branches.

- If jobs = 2, then one extra add row action.
- If jobs = 3, then two extra add row actions
- etc

But that won’t scale. A more scalable approach is to send a webhook to something like Make, and then have Make add the desired number of rows via the API.

---

<div class="post-metadata">

### Author: ![Matty\_Fenny](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/matty_fenny/32/39419_2.png) [@Matty\_Fenny](https://community.glideapps.com/u/Matty_Fenny)
#### Post date: [April 22, 2023, 9:57am UTC](https://community.glideapps.com/t/add-multiple-rows-based-on-a-form-entry/60814/6 "2023-04-22T09:57:27Z")

</div>

That’s the solution I was trying to avoid as the more jobs I need to add the more repetitive and massive the custom action will be.

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [April 22, 2023, 10:06am UTC](https://community.glideapps.com/t/add-multiple-rows-based-on-a-form-entry/60814/7 "2023-04-22T10:06:01Z")

</div>

Yes, as I mentioned that won’t scale very well.

So the better option is webhook → Make → API.

Do you have a Team Plan that provides API access?
