How to automatically set a value in drop-down list based on a value from another drop-down list
NickName:destiny931 Ask DateTime:2020-03-22T04:59:20

How to automatically set a value in drop-down list based on a value from another drop-down list

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
      
    }
  }
}

Copyright Notice:Content Author:「destiny931」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/60793222/how-to-automatically-set-a-value-in-drop-down-list-based-on-a-value-from-another

More about “How to automatically set a value in drop-down list based on a value from another drop-down list” related questions

How to automatically set a value in drop-down list based on a value from another drop-down list

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 ...

Show Detail

Change drop-down list value based on another drop-down list value

I've been trying to change a drop-down list's value (as well as the UI) based on another drop-down list's value as follows, but with no success. Any advice? $("[name=firstlist]").change(funct...

Show Detail

Error while displaying a drop-down list based on input from another drop-down list

I have created a html form. In that I have 2 drop down lists. Drop-down list1 retrieves values from sql database table and displays over there. Now I want to display another drop-down list with input

Show Detail

Django: Drop-down list value that is not on the list

I'm trying to input a value into drop-down list that is NOT on the list using Django. A default value is read from the database. But the trick is, that the user can see the value, but not change to...

Show Detail

select drop-down list by text not value

I am trying to write an Excel VBA script to navigate to a website and select from a drop-down list using the text in the list item, NOT the value of the index. By examining the HTML code, I can see...

Show Detail

Unable to get value from drop-down list

I have a problem when i try to recover selected value from drop-down list. If i select 2nd or 3rd drop-down list value code returns first value of drop-down list. My code: drprdepart.SelectedItem.

Show Detail

Invisible table based on drop-down list value

There is a drop-down list with numbers that was made using Data-> Data validation. The goal is to make visible only the number of rows of the table that was chosen from drop-down list without using...

Show Detail

Enable and select values of Drop-down based on the value selected in another Drop-down

I have couple of Drop-downs on a page; after selecting a value on the First Drop-down, Second Drop-down will get enable and the values get loaded accordingly. When running manually, after selectin...

Show Detail

Excel, drop-down list changes contents of another cell, not formulaic

How do I make one cell display a value based on another cell choice that is a drop-down list selection? I don't know how to do macros, and I have tried researching. I think the question about displ...

Show Detail

phprunner drop-down list -default value

I have a drop-down list of US states in my db. Each record has details of the user etc. now when i try to edit the user details, the drop-down list should retain the original value of the state but...

Show Detail