I have a googlesheet with Columns A - P. Column B (GROUP) is a dropdown list and Column N (EXECUTION STATUS) is a drop-down list. I am trying to automatically set a particular value in a cell for GROUP based on the value that I selected in the EXECUTION STATUS dropdown list.
For Example: GROUP has the following values in the drop-down list:
DEVELOPER QA LEVEL 1 SUPPORT LEVEL 2 SUPPORT
EXECUTION STATUS has the following values in the drop-down list:
PASSED FAILED NOT EXECUTED BLOCKED
Here is what I want to happen: If I select FAILED as the EXECUTION STATUS, I want the GROUP to automatically change to DEVELOPER.
Here is my function:
function changeGroup(event)
{
var ColN = 14; // Column Number of "N"
var changedRange = event.source.getActiveRange();
if (changedRange.getColumn() == ColN)
{
// An edit has occurred in Column N
var state = changedRange.getValue();
var Group = event.source.getActiveSheet().getRange(changedRange.getRow(),ColN-12);
switch (state)
{
case "FAILED":
// Select DEVELOPER from dropdown list
Group.setValue("Developer");
break
}
}
}
I think my problem is the Group.setValue("Developer") line. SetValue is setting a text value. I am trying to set a value from the drop-down list. I'm not sure. Any suggestions?