Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

186
Views
Joining Data & Sorting by Unique Values (JS and Google-Sheets)

TL;DR:

  1. Novice with JavaScript and in need of assistance in joining multiple data sources and then updating only specific records while limiting updated cells to only 'new' information.

  2. Any pointers on syntax to control/manage order of execution are appreciated. Mainly to ensure everything happens in the same order, every time.

Long Version:

Hello All!

I'm a novice when it comes to Apps Script (and by extension JavaScript), and I'm wondering if anyone has it in their heart of hearts to lend me a hand for a few minutes.

Background: I'm working on automating one of our on-going tasks that tracks incident reports and on-going updates in monthly snapshots.

Issue: In an attempt to better explain what I'm trying to do, I've employed a (very) modified version of syntax loosely based on (my limited knowledge of) JS.

The general order of operations is below. I know there are some steps missing that would be in the actual code, but I did that for what I hope is a more simple explanation.

Prior to executing any JS to take care of requisite housekeeping work, I run an existing sql query to capture updated information from a DB

var Q = updated query results
var NEW = new sheet/tab containing data from Q
var OLD = existing (static) report (last month)
var TEMP = new sheet/tab 

create NEW;
join OLD with NEW in TEMP;

SORT TEMP ('A2:A!') by col1; 
  UPDATE ('A:!') in col5-col10 with NEW; 

    // only update cell with NEW data if data in NEW is different that data in OLD

    IF data in NEW (!=) OLD; // I think this is how that is written...     

For a visual example, here is what I'm thinking:

visual representation

I am already thankful for your time to read this far. If you think you can / have time to walk me through this, I would GREATLY appreciate it!

Cheers!

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!