# Add new row while retaining some row cells the same

**URL:** <https://community.glideapps.com/t/add-new-row-while-retaining-some-row-cells-the-same/16679>\
**Category:** Ask for Help\
**Created:** [October 2, 2020, 11:25pm UTC](https://community.glideapps.com/t/add-new-row-while-retaining-some-row-cells-the-same/16679 "2020-10-02T23:25:09Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cisco\_Muratalla](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/cisco_muratalla/32/12358_2.png) [@Cisco\_Muratalla](https://community.glideapps.com/u/Cisco_Muratalla)\
**Post date:** [October 2, 2020, 11:25pm UTC](https://community.glideapps.com/t/add-new-row-while-retaining-some-row-cells-the-same/16679/1 "2020-10-02T23:25:10Z")

</div>

Can a form component have some components designated ‘header info’ and others have ‘add’. When an ‘add’ component is selected then a new row is created in the sheet but carries over the ‘header’ info.

Time sheet app logs employee hours spent on a job and service code. In a day an employee can work on more than 1 job and service code. E.g. ‘John D’ worked 4 hours on Job A Service Code XY and 4 hours on same Job A but Service Code Z.

 ![Screenshot 2020-10-02 161122](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/2/29cc2f6479666373b3920462961f40c89d1f3c80.jpeg)

Currently users must create a new entry for each different job and/or service code for the same day. I can make a long form and have ‘Job 1’, ‘Job 2’, etc so that each row captures data.

However some employees work full day on the same job and service code.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [October 3, 2020, 12:31am UTC](https://community.glideapps.com/t/add-new-row-while-retaining-some-row-cells-the-same/16679/2 "2020-10-03T00:31:18Z")

</div>

I’m not sure I understand what you are asking. Are you saying that you want one row, but to allow the user to edit it if they want to add additional information? Or are you asking if for multiple rows per Job/ServiceCode, but you want some of the values to be automatically filled in?

If you have a list of jobs and the user can view the details of that job, then you can add the form button in that details view and carry over any values from the job into the the form via the Column Value components. Also, you can use the Special Value components to aquire certain values, like the signed in user’s email or the current datetime. Also you can set default values on some of the components.

In any case, a form will always write a new row and cannot edit an existing row. You would need the activate the edit button or add entry components on a details view screen.

---

<div class="post-metadata">

**Author:** ![Cisco\_Muratalla](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/cisco_muratalla/32/12358_2.png) [@Cisco\_Muratalla](https://community.glideapps.com/u/Cisco_Muratalla)\
**Post date:** [October 3, 2020, 1:34am UTC](https://community.glideapps.com/t/add-new-row-while-retaining-some-row-cells-the-same/16679/3 "2020-10-03T01:34:22Z")

</div>

Say you have 5 employees your submit for each day. Each of the 5 worked on (3) different ‘service codes’, this means that for the day you’ll make 3 entries for the 5 employees, however if you could enter their name, date and then make multiple entries for hours and service codes you save having to make a ‘new entry’ for each person. On the sheet you’d still see (3) rows for each employee.

---

<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:** [October 3, 2020, 1:43am UTC](https://community.glideapps.com/t/add-new-row-while-retaining-some-row-cells-the-same/16679/4 "2020-10-03T01:43:41Z")

</div>

What if you have 3 columns for service codes so each day is a single row?

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [October 3, 2020, 2:36am UTC](https://community.glideapps.com/t/add-new-row-while-retaining-some-row-cells-the-same/16679/5 "2020-10-03T02:36:19Z")

</div>

If you wanted 1 form entry to create 3 rows, then you would probably need to incorporate some sort of script to handle splitting the data. Or maybe some sort of setup in a new google sheet with a query and/or transpose formula. It would get quite a bit more complicated on the back end.

---

<div class="post-metadata">

**Author:** ![Cisco\_Muratalla](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/cisco_muratalla/32/12358_2.png) [@Cisco\_Muratalla](https://community.glideapps.com/u/Cisco_Muratalla)\
**Post date:** [October 3, 2020, 1:03pm UTC](https://community.glideapps.com/t/add-new-row-while-retaining-some-row-cells-the-same/16679/6 "2020-10-03T13:03:57Z")

</div>

if it was only service codes this would be an option to try, however there are 4 fields that need to be entered for each employee, so its 12 columns, I tried this option and it simply makes the form a long scroll

was hoping for a ‘basket’ type function, select employee and date then add hours, service code, etc to that employee/date then ‘check-out’ which would post a line for each combination of hour/service code

---

<div class="post-metadata">

**Author:** ![Cisco\_Muratalla](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/cisco_muratalla/32/12358_2.png) [@Cisco\_Muratalla](https://community.glideapps.com/u/Cisco_Muratalla)\
**Post date:** [October 3, 2020, 1:06pm UTC](https://community.glideapps.com/t/add-new-row-while-retaining-some-row-cells-the-same/16679/7 "2020-10-03T13:06:02Z")

</div>

i’ve not written a script, i’ll explore option to have all entries in 1 row then use query to summarize, many thanks

---

<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:** [October 3, 2020, 2:10pm UTC](https://community.glideapps.com/t/add-new-row-while-retaining-some-row-cells-the-same/16679/8 "2020-10-03T14:10:36Z")

</div>

You can have it as sections in a form using visibility conditions. Would it work?

---

<div class="post-metadata">

**Author:** ![Cisco\_Muratalla](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/cisco_muratalla/32/12358_2.png) [@Cisco\_Muratalla](https://community.glideapps.com/u/Cisco_Muratalla)\
**Post date:** [October 3, 2020, 4:29pm UTC](https://community.glideapps.com/t/add-new-row-while-retaining-some-row-cells-the-same/16679/9 "2020-10-03T16:29:01Z")

</div>

interesting, yes a good option, I can add a switch, ‘add more’ and then display next set of fields to enter, I like it, many thanks.

---

<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:** [October 3, 2020, 4:40pm UTC](https://community.glideapps.com/t/add-new-row-while-retaining-some-row-cells-the-same/16679/10 "2020-10-03T16:40:23Z")

</div>

You can have a copy here of my take on this.

> [@Available for copy: Newest form choice, progress bars & joined texts concept](https://community.glideapps.com/t/available-for-copy-newest-form-choice-progress-bars-joined-texts-concept/14799):
>
> Hi guys, as I work with my latest apps, I discovered some tricks that may help with your app design, so I thought it would be nice to share. App link: [https://interesting-history-7076.glideapp.io/](https://interesting-history-7076.glideapp.io/) 1/Filtered form choice Very recently, it seems Glide has added support for filtering choices within a form, so in this concept app I applied it to two cases: Filter a choice based on a previous choice in the same screen: You can find in the car choice that the car model will be filtered based on t…

---

<div class="post-metadata">

**Author:** ![Cisco\_Muratalla](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/cisco_muratalla/32/12358_2.png) [@Cisco\_Muratalla](https://community.glideapps.com/u/Cisco_Muratalla)\
**Post date:** [October 3, 2020, 4:56pm UTC](https://community.glideapps.com/t/add-new-row-while-retaining-some-row-cells-the-same/16679/11 "2020-10-03T16:56:52Z")

</div>

many thank, this is great, nice resource for design
