I've got this script below but it keeps returning the incorrect information. For instance, even though the "urgency" may equal "medium", it returns the "critical" result.
var initialcontact;
var row = sheet.getActiveRange().getRowIndex();
var urgency = sheet.getRange(row, getColIndexByName("Urgency")).getValue();
if (urgency = "Critical") {initialcontact = "1 hour";}
else if (urgency = "High") {initialcontact = "4 hours";}
else if (urgency = "Medium") {initialcontact = "1 day";}
else if (urgency = "Low") {initialcontact = "3 days";}