# Adding days by row

**URL:** <https://community.glideapps.com/t/adding-days-by-row/36150>\
**Category:** Ask for Help\
**Created:** [December 21, 2021, 1:15am UTC](https://community.glideapps.com/t/adding-days-by-row/36150 "2021-12-21T01:15:31Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)\
**Post date:** [December 21, 2021, 1:15am UTC](https://community.glideapps.com/t/adding-days-by-row/36150/1 "2021-12-21T01:15:31Z")

</div>

Hello,  
In the spreadsheet,  
it is very easy to add days in each row based on the input of the planned number of days as shown in the image below.

 ![Screenshot 2021-12-21 080034](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/9/19f35acd5853a3b0fe7d0113c142e2d964a4d267.jpeg)  
My question is how to do it with tables inside Glide? Thank you.

---

<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:** [December 21, 2021, 1:20am UTC](https://community.glideapps.com/t/adding-days-by-row/36150/2 "2021-12-21T01:20:45Z")

</div>

You want to count the number of days between Start and End?

Just use a Math column with the formula `End - Start`

---

<div class="post-metadata">

**Author:** ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)\
**Post date:** [December 21, 2021, 1:31am UTC](https://community.glideapps.com/t/adding-days-by-row/36150/3 "2021-12-21T01:31:31Z")

</div>

Thank you for the quick response Darren,  
End day is start + days -1, and the new start day on the next row is end + 1. This is a flow calculation.  
The user is only allowed to input the duration of the day.

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [December 21, 2021, 1:43am UTC](https://community.glideapps.com/t/adding-days-by-row/36150/4 "2021-12-21T01:43:07Z")

</div>

use math column to add days to a date, make sure all dates are in date format

 ![Screen Shot 2021-12-20 at 8.44.29 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/3/03cae7943e59d7704b7186785bbb9dd0f7d67498.png)

---

<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:** [December 21, 2021, 1:49am UTC](https://community.glideapps.com/t/adding-days-by-row/36150/5 "2021-12-21T01:49:07Z")

</div>

ah, I see.  
But isn’t that simply a matter of taking the values from the existing (last) row, and using those together with the input number of days to calculate the values for the new row?

Am I still missing something?

---

<div class="post-metadata">

**Author:** ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)\
**Post date:** [December 21, 2021, 1:54am UTC](https://community.glideapps.com/t/adding-days-by-row/36150/6 "2021-12-21T01:54:17Z")

</div>

Maybe Darren has caught my point because my English is bad, I try to explain again.  
This is a Gantt Chart model date calculation where the start date is added vertically based on the input day duration. Horizontal addition of course can be done in Glide, but I can’t find a way how to move it vertically on the next row of the start day.

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [December 21, 2021, 1:56am UTC](https://community.glideapps.com/t/adding-days-by-row/36150/7 "2021-12-21T01:56:14Z")

</div>

oh… you wanna calculate the next row in a glide? that impossible… it takes really big workaround to make it happen

---

<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:** [December 21, 2021, 2:01am UTC](https://community.glideapps.com/t/adding-days-by-row/36150/8 "2021-12-21T02:01:18Z")

</div>

> [@Himaladin](#):
>
> This is a Gantt Chart model date calculation where the start date is added vertically based on the input day duration. Horizontal addition of course can be done in Glide, but I can’t find a way how to move it vertically on the next row of the start day.

okay, I’m starting to understand.  
Is the data added one row at a time, or are you looking for a way to add all rows at once? (with a single action)

---

<div class="post-metadata">

**Author:** ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)\
**Post date:** [December 21, 2021, 2:02am UTC](https://community.glideapps.com/t/adding-days-by-row/36150/9 "2021-12-21T02:02:10Z")

</div>

Can we try it? Or maybe there are features that need to be completed by Glide, of course, there is no need to go through a big workround.

---

<div class="post-metadata">

**Author:** ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)\
**Post date:** [December 21, 2021, 2:02am UTC](https://community.glideapps.com/t/adding-days-by-row/36150/10 "2021-12-21T02:02:47Z")

</div>

Right 😅

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [December 21, 2021, 2:04am UTC](https://community.glideapps.com/t/adding-days-by-row/36150/11 "2021-12-21T02:04:09Z")

</div>

let me understand it better… you wanna add the next row with a calculated date? that is easy… or you wanna calculate existing rows based on the previous row? that’s hard…  
in your google sheet screenshot I see that the next row is calculated based on days in the middle… but these days are existing or you are adding them one by one?

---

<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:** [December 21, 2021, 2:04am UTC](https://community.glideapps.com/t/adding-days-by-row/36150/12 "2021-12-21T02:04:33Z")

</div>

Which one is right?

One row at a time?  
Or all rows at once?

---

<div class="post-metadata">

**Author:** ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)\
**Post date:** [December 21, 2021, 2:28am UTC](https://community.glideapps.com/t/adding-days-by-row/36150/13 "2021-12-21T02:28:32Z")

</div>

When the user inputs the duration, it will be gradual from top to bottom, starting from the initial start of the project for the first activity item. This will return the first end date, then add one day to the second line start date. Here the user needs to input the second duration to generate the second end date, and so on.  
Is this what is called one row at a time, I didn’t define it? Without input duration, all will not be filled alias empty.

![InkedScreenshot 2021-12-21 091550](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/6/36191779d7aa93a6c8563c02c6fc3367ac918556.jpeg)

---

<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:** [December 21, 2021, 2:35am UTC](https://community.glideapps.com/t/adding-days-by-row/36150/14 "2021-12-21T02:35:28Z")

</div>

Okay, I get it now. And I think it should be doable. Once you have the first row, then each time a user adds the number of days you would have an action that does two steps. Firstly a Set Column values on the current row to update the End Date and the number of days, and then an Add Row action to create the next row with a calculated Start Date.

I don’t have time right now, but I can see if I can make an example sometime later today.

---

<div class="post-metadata">

**Author:** ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)\
**Post date:** [December 21, 2021, 3:06am UTC](https://community.glideapps.com/t/adding-days-by-row/36150/15 "2021-12-21T03:06:55Z")

</div>

Very appreciated.  
In addition, I expect your solution for the start and end date columns to be written back into the spreadsheet, as these have links to several other sheets. I hope my expectations are not too much. Thank you.

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [December 21, 2021, 3:11am UTC](https://community.glideapps.com/t/adding-days-by-row/36150/16 "2021-12-21T03:11:02Z")

</div>

try if that’s what you are looking for?

> **[StructureArt's App testing](https://sa-test2.glideapp.io/)**

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [December 21, 2021, 3:27am UTC](https://community.glideapps.com/t/adding-days-by-row/36150/17 "2021-12-21T03:27:23Z")

</div>

is my sample good?

---

<div class="post-metadata">

**Author:** ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)\
**Post date:** [December 21, 2021, 3:29am UTC](https://community.glideapps.com/t/adding-days-by-row/36150/18 "2021-12-21T03:29:37Z")

</div>

Thank Uzo, I will learn it later…

 ![Screenshot 2021-12-21 102139](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/7/6766a239b211fa7e810c6953d833a3cfc1c2578c.jpeg)

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [December 21, 2021, 3:36am UTC](https://community.glideapps.com/t/adding-days-by-row/36150/19 "2021-12-21T03:36:19Z")

</div>

the screen is empty???

---

<div class="post-metadata">

**Author:** ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)\
**Post date:** [December 21, 2021, 3:42am UTC](https://community.glideapps.com/t/adding-days-by-row/36150/20 "2021-12-21T03:42:33Z")

</div>

Looks like you’re getting close, and are you currently doing maintenance? Now I’ve managed to open and try it then all the lines are gone again.  
Do you use a custom form and fill it with values from a math column?

 ![Screenshot 2021-12-21 103516](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/2/c2406e2711fac8f091e8fb50d9443ab79932972b.jpeg)

I will try again.

[Next page](https://community.glideapps.com/t/adding-days-by-row/36150.md?page=2)
