Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. // All sheets
  2. var overdrachtSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Overdrachten");
  3. var inschrijvingSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Inschrijvingen");
  4. var uitschrijvingSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Uitschrijvingen");
  5. var vergaanvraagSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Vergunningaanvraag");
  6. var zonetoegangSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Zonetoegang");
  7. var playerSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Spelers");
  8.  
  9. // Get all UUID values
  10. var overdr_uuids = overdrachtSheet.getRange("G8:G").getValues().filter(function(uuid){ return uuid != "" });
  11. var inschr_uuids = inschrijvingSheet.getRange("C8:C").getValues().filter(function(uuid){ return uuid != "" });
  12. var uitschr_uuids = uitschrijvingSheet.getRange("C8:C").getValues().filter(function(uuid){ return uuid != "" });
  13. var vergaanvr_uuids = vergaanvraagSheet.getRange("C8:C").getValues().filter(function(uuid){ return uuid != "" });
  14. var zonetoeg_uuids = zonetoegangSheet.getRange("C8:C").getValues().filter(function(uuid){ return uuid != "" });
  15.  
  16. // Get an array with unique UUID values only
  17. var unique_uuids = [];
  18. overdr_uuids.forEach(function(uuid){
  19. if(unique_uuids.indexOf(uuid[0]) < 0){
  20. unique_uuids.push(uuid[0]);
  21. }
  22. })
  23.  
  24. inschr_uuids.forEach(function(uuid){
  25. if(unique_uuids.indexOf(uuid[0]) < 0){
  26. unique_uuids.push(uuid[0]);
  27. }
  28. })
  29.  
  30. uitschr_uuids.forEach(function(uuid){
  31. if(unique_uuids.indexOf(uuid[0]) < 0){
  32. unique_uuids.push(uuid[0]);
  33. }
  34. })
  35.  
  36. vergaanvr_uuids.forEach(function(uuid){
  37. if(unique_uuids.indexOf(uuid) < 0){
  38. unique_uuids.push(uuid[0]);
  39. }
  40. })
  41.  
  42. zonetoeg_uuids.forEach(function(uuid){
  43. if(unique_uuids.indexOf(uuid) < 0){
  44. unique_uuids.push(uuid[0]);
  45. }
  46. })
  47.  
  48. var setValuesArray = [];
  49. unique_uuids.forEach(function(uuid){
  50. setValuesArray.push([uuid]);
  51. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement