Documentation shows examples of creating a SelectionInput item: https://developers.google.com/apps-script/reference/card-service/selection-input
Question: How to read value of SelectionInput in an action handler? Like:
var dropdown = CardService.newSelectionInput()
.setType(CardService.SelectionInputType.DROPDOWN)
.setTitle("Status")
.setFieldName("dd_status")
.addItem("A", 1, status == 1)
.addItem("B", 2, status == 2)
.addItem("C", 3, status == 3)
.setOnChangeAction(CardService.newAction()
.setFunctionName("handleStatusDropdownChange").setParameters({'thread_id': thread_id}));
Now, how to access dd_status
in handleStatusDropdownChange
? It does not seem to appear in parameters, when the handler is defined like:
function handleStatusDropdownChange(e) {
var parameters = e.parameters;
}
Where is it?