# Time stamp update

**URL:** <https://community.glideapps.com/t/time-stamp-update/1382>\
**Category:** Ask for Help\
**Created:** [October 25, 2019, 3:55pm UTC](https://community.glideapps.com/t/time-stamp-update/1382 "2019-10-25T15:55:07Z")\
**Posts on this page:** 20\
**Page:** 4

<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:** [February 19, 2021, 2:20am UTC](https://community.glideapps.com/t/time-stamp-update/1382/63 "2021-02-19T02:20:45Z")

</div>

I’m quite busy at work today. I can have a look this evening if help is still required then.

---

<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:** [February 19, 2021, 12:36pm UTC](https://community.glideapps.com/t/time-stamp-update/1382/64 "2021-02-19T12:36:03Z")

</div>

@abe.sherman how are you doing with this? Do you still need some help?

---

<div class="post-metadata">

**Author:** ![abe.sherman](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/abe.sherman/32/11260_2.png) [@abe.sherman](https://community.glideapps.com/u/abe.sherman)\
**Post date:** [February 19, 2021, 4:10pm UTC](https://community.glideapps.com/t/time-stamp-update/1382/65 "2021-02-19T16:10:49Z")

</div>

Yes i do, i need to be able to do a bulk script instead of active sheet.

[![](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/3/8365720f5a6cb8f266903120543faa4f4581e1e6.jpeg "Glide full video of what i am running into.") ](https://www.youtube.com/watch?v=jJpOSCGxHKc)

Link to discord spreadsheet community: [Spreadsheets Discord Community](https://discord.gg/NYwNDTg)

---

<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:** [February 19, 2021, 4:13pm UTC](https://community.glideapps.com/t/time-stamp-update/1382/66 "2021-02-19T16:13:56Z")

</div>

Okay. I can take a look, but to make it a bit easier can you please share with me:

- a copy of the current script you’re using
- some sample data I can work with
- a clear explanation of exactly what you need the script to do

---

<div class="post-metadata">

**Author:** ![abe.sherman](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/abe.sherman/32/11260_2.png) [@abe.sherman](https://community.glideapps.com/u/abe.sherman)\
**Post date:** [February 19, 2021, 4:36pm UTC](https://community.glideapps.com/t/time-stamp-update/1382/67 "2021-02-19T16:36:17Z")

</div>

@Darren_Murphy We can use this script and combined it with what @ThinhDinh showed us? I made another video. Sorry if its a long one.

---

<div class="post-metadata">

**Author:** ![abe.sherman](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/abe.sherman/32/11260_2.png) [@abe.sherman](https://community.glideapps.com/u/abe.sherman)\
**Post date:** [February 19, 2021, 4:56pm UTC](https://community.glideapps.com/t/time-stamp-update/1382/68 "2021-02-19T16:56:33Z")

</div>

@Darren_Murphy [Copy of Glide NOIP Sample - Google Sheets](https://docs.google.com/spreadsheets/d/14n3zSCNdywMg0yeUK1-F5S1nPwx5ir8IiRmCL_rK4lc/edit?usp=sharing)

---

<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:** [February 19, 2021, 4:58pm UTC](https://community.glideapps.com/t/time-stamp-update/1382/69 "2021-02-19T16:58:23Z")

</div>

Okay, so if there is a checkmark in column H, then you want a current timestamp in column AZ.  
Is that it?

---

<div class="post-metadata">

**Author:** ![abe.sherman](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/abe.sherman/32/11260_2.png) [@abe.sherman](https://community.glideapps.com/u/abe.sherman)\
**Post date:** [February 19, 2021, 4:58pm UTC](https://community.glideapps.com/t/time-stamp-update/1382/70 "2021-02-19T16:58:40Z")

</div>

Yes

---

<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:** [February 19, 2021, 4:59pm UTC](https://community.glideapps.com/t/time-stamp-update/1382/71 "2021-02-19T16:59:02Z")

</div>

Okay, gimme a few minutes.

---

<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:** [February 19, 2021, 5:11pm UTC](https://community.glideapps.com/t/time-stamp-update/1382/72 "2021-02-19T17:11:12Z")

</div>

Look in your script editor for a file called darren.gs

Tell me if that does what you want.

---

<div class="post-metadata">

**Author:** ![abe.sherman](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/abe.sherman/32/11260_2.png) [@abe.sherman](https://community.glideapps.com/u/abe.sherman)\
**Post date:** [February 19, 2021, 5:13pm UTC](https://community.glideapps.com/t/time-stamp-update/1382/73 "2021-02-19T17:13:50Z")

</div>

Looks good so far, Can we do col Name instead of col Number, to avoid issues when i move tabs?

---

<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:** [February 19, 2021, 5:15pm UTC](https://community.glideapps.com/t/time-stamp-update/1382/74 "2021-02-19T17:15:15Z")

</div>

Okay…

---

<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:** [February 19, 2021, 5:22pm UTC](https://community.glideapps.com/t/time-stamp-update/1382/75 "2021-02-19T17:22:42Z")

</div>

Try it now.  
It looks for ‘HTTP\_up’ and ‘Monitoring Since’

---

<div class="post-metadata">

**Author:** ![abe.sherman](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/abe.sherman/32/11260_2.png) [@abe.sherman](https://community.glideapps.com/u/abe.sherman)\
**Post date:** [February 19, 2021, 5:26pm UTC](https://community.glideapps.com/t/time-stamp-update/1382/76 "2021-02-19T17:26:21Z")

</div>

Thank you, you work fast. Wow a code like that would take me a few days to a month.  
I will share the code here so others can find it useful. Hats off to you @Darren_Murphy

```
function myFunction() {
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = ss.getSheetByName('NoIP');
  var headers = sheet.getRange(1,1,1,sheet.getLastColumn()).getValues();
  var source_col = headers[0].indexOf('HTTP_up') + 1;
  var target_col = headers[0].indexOf('Monitoring Since') + 1;
  var data = sheet.getRange(2,source_col,sheet.getLastRow()-1,1).getValues();
  var timestamps = [];
  var now = new Date();
  data.forEach(function (row) {
    var val = row[0];
    if (val.match(/✅/) ) {
      timestamps.push([now]);
    }
    else {
      timestamps.push(['']);
    }
  });
  sheet.getRange(2,target_col,sheet.getLastRow()-1,1).setValues(timestamps);
}
```

---

<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:** [February 19, 2021, 5:32pm UTC](https://community.glideapps.com/t/time-stamp-update/1382/77 "2021-02-19T17:32:17Z")

</div>

You’re welcome.  
When I looked earlier today, my gut told me that you had overcomplicated the problem, but I didn’t have the time then to have a close look.

---

<div class="post-metadata">

**Author:** ![abe.sherman](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/abe.sherman/32/11260_2.png) [@abe.sherman](https://community.glideapps.com/u/abe.sherman)\
**Post date:** [February 19, 2021, 5:34pm UTC](https://community.glideapps.com/t/time-stamp-update/1382/78 "2021-02-19T17:34:19Z")

</div>

I usually over complicate stuff when it comes to coding. I am not good at it. but i play with it. need to run, Picking up my son from school now. Catch up soon.

---

<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:** [February 19, 2021, 11:57pm UTC](https://community.glideapps.com/t/time-stamp-update/1382/79 "2021-02-19T23:57:48Z")

</div>

Thanks for the trick about using column headers, would be very useful in many cases for me.

---

<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:** [February 20, 2021, 2:21am UTC](https://community.glideapps.com/t/time-stamp-update/1382/80 "2021-02-20T02:21:40Z")

</div>

yeah, I’ve started using that in my trigger scripts that remove “deleted” rows. Having hard-coded column numbers always made me _super_ nervous. I might make a post about that, as some of the examples we have in the forum (including some that I’ve posted) aren’t really that good.

---

<div class="post-metadata">

**Author:** ![abe.sherman](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/abe.sherman/32/11260_2.png) [@abe.sherman](https://community.glideapps.com/u/abe.sherman)\
**Post date:** [February 24, 2021, 2:12am UTC](https://community.glideapps.com/t/time-stamp-update/1382/81 "2021-02-24T02:12:14Z")

</div>

Sorry to bother you. @Darren_Murphy But I realized if the the CHECKMARK dose not exist it clears the cell. Anyway to avoid 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:** [February 24, 2021, 3:55am UTC](https://community.glideapps.com/t/time-stamp-update/1382/82 "2021-02-24T03:55:30Z")

</div>

Yeah that can be fixed, but requires reworking the function a little bit.  
I still have access to that sheet that you shared, so I can make the changes there.  
Do you have a backup of that? (just in case I screw up) 😉

[Previous page](https://community.glideapps.com/t/time-stamp-update/1382.md?page=3)

[Next page](https://community.glideapps.com/t/time-stamp-update/1382.md?page=5)
