# Copy Row Script

**URL:** <https://community.glideapps.com/t/copy-row-script/30714>\
**Category:** Ask for Help\
**Created:** [August 20, 2021, 7:20am UTC](https://community.glideapps.com/t/copy-row-script/30714 "2021-08-20T07:20:13Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)\
**Post date:** [August 20, 2021, 7:20am UTC](https://community.glideapps.com/t/copy-row-script/30714/1 "2021-08-20T07:20:13Z")

</div>

Do you guys have idea in Apps script on Google Sheet,

I’ve a few pages with respective details for each quotation number.  
How to Copy and Paste specific rows from specific sheets to its same sheet at the bottom(after last row) when condition is met.

Like to copy the details on quotation GE-2108-0271-Rev.0 in few pages and paste the row at the bottom in the same sheet?

Page 1: to be exact i need the number increment by 1 from GE-2108-0271-Rev.0 to GE-2108-0271-Rev.1

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/d/3d76695fc23caeac95c10bbf7b27cefa1f992a63.png)

Page 2:  
let say got 3 items

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/d/4d2b21364e3b3fb436317f7515e28310138cb9d6.png)

Page 3:  
Let say got 1 item

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/4/841b88b13c1e52d4f6e74066ddc200cfdba8e476.png)

---

<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:** [August 23, 2021, 5:03am UTC](https://community.glideapps.com/t/copy-row-script/30714/2 "2021-08-23T05:03:11Z")

</div>

custom triggered script… about 1 hour to make it

---

<div class="post-metadata">

**Author:** ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)\
**Post date:** [August 23, 2021, 5:09am UTC](https://community.glideapps.com/t/copy-row-script/30714/3 "2021-08-23T05:09:04Z")

</div>

hmmmm i see, glad if you could help

---

<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:** [August 23, 2021, 5:41am UTC](https://community.glideapps.com/t/copy-row-script/30714/4 "2021-08-23T05:41:32Z")

</div>

this one is beyond a free help… for me or my team… please wait, there is so many experts here that might have a ready solution or spare time… I can take this task only as a contract.

---

<div class="post-metadata">

**Author:** ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)\
**Post date:** [August 23, 2021, 5:45am UTC](https://community.glideapps.com/t/copy-row-script/30714/5 "2021-08-23T05:45:42Z")

</div>

My idea in Glideapps was adding row action in a screen but adding row for all have relations with in other sheets.  
Let me know if you have any other idea.

---

<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:** [August 23, 2021, 5:47am UTC](https://community.glideapps.com/t/copy-row-script/30714/6 "2021-08-23T05:47:53Z")

</div>

can you rephrase the question?.. you wanna add a row for more than one sheet?.. if yes… you can add another action “add row” if you don’t know how many sheets, then it have to be a custom script

---

<div class="post-metadata">

**Author:** ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)\
**Post date:** [August 23, 2021, 5:54am UTC](https://community.glideapps.com/t/copy-row-script/30714/7 "2021-08-23T05:54:33Z")

</div>

Let say, now, i’m in “M-Front” sheet

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/6/b66aa436985f02a94c5d05533c7d8b4bd8bfc45c.png)

I need it all pages which have relation with that quotation copy the entire row.

The problem is, in order to add row in other sheet,

We have to lookup each column for each sheet which it is very messed up.

I have like 5 pages with respective details.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/a/2a86772a2b3222931741b1d501931f54e3291fb6.png)

---

<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:** [August 23, 2021, 6:01am UTC](https://community.glideapps.com/t/copy-row-script/30714/8 "2021-08-23T06:01:32Z")

</div>

I understand that in your mind, the question since like obvious… but from the outsider’s point of view… I don’t see a question… and I do understand it might be a complex App… If you can simplify the question to basics, that someone who doesn’t see the actual app and GS and is willing to spent hours to grind into it, will undestand

---

<div class="post-metadata">

**Author:** ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)\
**Post date:** [August 23, 2021, 6:05am UTC](https://community.glideapps.com/t/copy-row-script/30714/9 "2021-08-23T06:05:12Z")

</div>

Like, how to add row using one button for all pages/sheets which have relations with current screen/current details/current row.

It is clear question or still no?

---

<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:** [August 23, 2021, 6:07am UTC](https://community.glideapps.com/t/copy-row-script/30714/10 "2021-08-23T06:07:59Z")

</div>

that brings us back to my question before… it is a 1 add row or add row to multiple sheets?

---

<div class="post-metadata">

**Author:** ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)\
**Post date:** [August 23, 2021, 6:12am UTC](https://community.glideapps.com/t/copy-row-script/30714/11 "2021-08-23T06:12:54Z")

</div>

its like copy row from its sheet and paste from its own sheet.

---

<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:** [August 23, 2021, 6:14am UTC](https://community.glideapps.com/t/copy-row-script/30714/12 "2021-08-23T06:14:57Z")

</div>

if is only one sheet…and you wanna copy first row and paste to a last new open row???

---

<div class="post-metadata">

**Author:** ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)\
**Post date:** [August 23, 2021, 6:17am UTC](https://community.glideapps.com/t/copy-row-script/30714/13 "2021-08-23T06:17:37Z")

</div>

basically , add row to multiple sheet.  
But i cannot simply saying for adding row because we didnt have options to add row for relation details .

---

<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:** [August 23, 2021, 6:19am UTC](https://community.glideapps.com/t/copy-row-script/30714/14 "2021-08-23T06:19:50Z")

</div>

you can ad values from relations… you can add multiple rows as long number of sheets is not variable…for any other option, you need custom script

---

<div class="post-metadata">

**Author:** ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)\
**Post date:** [August 23, 2021, 6:22am UTC](https://community.glideapps.com/t/copy-row-script/30714/15 "2021-08-23T06:22:04Z")

</div>

> [@Uzo](#):
>
> as long number of sheets is not variable

You meant i have to know how many sheets i have ?

---

<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:** [August 23, 2021, 6:23am UTC](https://community.glideapps.com/t/copy-row-script/30714/16 "2021-08-23T06:23:58Z")

</div>

you have to have sheets that you you gonna be adding rows to it before composing action to add a row

---

<div class="post-metadata">

**Author:** ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)\
**Post date:** [August 23, 2021, 6:27am UTC](https://community.glideapps.com/t/copy-row-script/30714/17 "2021-08-23T06:27:57Z")

</div>

Yes i have.  
Let say now i’m now in “M-Front” screen.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/f/afd383f2cb5545491e691af013bbf72655e198b5.png)

How to add row when we are in “M-Front” at “M-Item”

I need to copy all three items since it relation with “M-Front”

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/d/8d4d2016dcbcdc5846ad50c88456611379b0478d.png)

---

<div class="post-metadata">

**Author:** ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)\
**Post date:** [August 23, 2021, 6:30am UTC](https://community.glideapps.com/t/copy-row-script/30714/18 "2021-08-23T06:30:21Z")

</div>

Because to add row in other sheet the details is no have unless we lookup each column right ?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/0/10e7481991bccda6735e3b91db2d5d0cf9e2652e.png)

---

<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:** [August 23, 2021, 6:37am UTC](https://community.glideapps.com/t/copy-row-script/30714/19 "2021-08-23T06:37:21Z")

</div>

ok… you are making me working hard for free… LOL  
so my conclusion is… You wanna copy 3 rows from a sheet to another sheet?

---

<div class="post-metadata">

**Author:** ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)\
**Post date:** [August 23, 2021, 6:39am UTC](https://community.glideapps.com/t/copy-row-script/30714/20 "2021-08-23T06:39:18Z")

</div>

😩

Glideapps should allow to add row with its relation 😩

I need to add row that 3 items from its sheet to its own sheet

[Next page](https://community.glideapps.com/t/copy-row-script/30714.md?page=2)
