Guest User

Untitled

a guest
Jan 18th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. function onEdit(e) {
  2.  
  3. var ss = e.range.getSheet().getParent();
  4. var sheet = e.range.getSheet();
  5. var row = e.range.getRow();
  6. var columns = [1, 2, 3, 4, 5, 6, 7, 8, 9];
  7.  
  8.  
  9. //assign titles as 'keys' to array
  10. var titles = []
  11.  
  12. //assign values of edited row to array
  13. var values = []
  14.  
  15. //create an object to associate the title to the new edited values
  16. var task = {}
  17.  
  18.  
  19.  
  20. for(var i in columns){
  21.  
  22. titles.push(sheet.getRange(1, noTouch[i]).getValue()); //push titles
  23. values.push(sheet.getRange(row, noTouch[i]).getValue()); //push values of updated row
  24. task[titles[i]] = values[i]; //add the values to their property names in task object
  25.  
  26. }
  27.  
  28. function GetInfo(row,column){
  29.  
  30. for(var i in column){
  31.  
  32. titles.push(sheet.getRange(1, noTouch[i]).getValue()); //push titles
  33. values.push(sheet.getRange(row, noTouch[i]).getValue()); //push values of updated row
  34. this.task[titles[i]] = values[i]; //add the values to their task
  35.  
  36. }
  37. }
  38.  
  39. var list = new GetInfo(row,columns);
  40.  
  41. list.task["client"]
Add Comment
Please, Sign In to add comment