Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // All sheets
- var overdrachtSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Overdrachten");
- var inschrijvingSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Inschrijvingen");
- var uitschrijvingSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Uitschrijvingen");
- var vergaanvraagSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Vergunningaanvraag");
- var zonetoegangSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Zonetoegang");
- var playerSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Spelers");
- // Get all UUID values
- var overdr_uuids = overdrachtSheet.getRange("G8:G").getValues().filter(function(uuid){ return uuid != "" });
- var inschr_uuids = inschrijvingSheet.getRange("C8:C").getValues().filter(function(uuid){ return uuid != "" });
- var uitschr_uuids = uitschrijvingSheet.getRange("C8:C").getValues().filter(function(uuid){ return uuid != "" });
- var vergaanvr_uuids = vergaanvraagSheet.getRange("C8:C").getValues().filter(function(uuid){ return uuid != "" });
- var zonetoeg_uuids = zonetoegangSheet.getRange("C8:C").getValues().filter(function(uuid){ return uuid != "" });
- // Get an array with unique UUID values only
- var unique_uuids = [];
- overdr_uuids.forEach(function(uuid){
- if(unique_uuids.indexOf(uuid[0]) < 0){
- unique_uuids.push(uuid[0]);
- }
- })
- inschr_uuids.forEach(function(uuid){
- if(unique_uuids.indexOf(uuid[0]) < 0){
- unique_uuids.push(uuid[0]);
- }
- })
- uitschr_uuids.forEach(function(uuid){
- if(unique_uuids.indexOf(uuid[0]) < 0){
- unique_uuids.push(uuid[0]);
- }
- })
- vergaanvr_uuids.forEach(function(uuid){
- if(unique_uuids.indexOf(uuid) < 0){
- unique_uuids.push(uuid[0]);
- }
- })
- zonetoeg_uuids.forEach(function(uuid){
- if(unique_uuids.indexOf(uuid) < 0){
- unique_uuids.push(uuid[0]);
- }
- })
- var setValuesArray = [];
- unique_uuids.forEach(function(uuid){
- setValuesArray.push([uuid]);
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement