I have an Apps Script code that dynamically creates a dropdown depending on another one, but the generated dropdown has no chips:

Is there any way I can customize the dropdown style within Apps Script?
The code is the following:
function onEdit() {
var monthTabs = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
var aCell = SpreadsheetApp.getActiveSheet().getActiveCell();
var aColumn = aCell.getColumn();
if (aColumn == 4 && monthTabs.includes(SpreadsheetApp.getActiveSheet().getName())) {
var cellContent = aCell.getValue();
var range = SpreadsheetApp.getActiveSheet().getRange(aCell.getRow(), aColumn + 1);
if (cellContent == "") {
range.clearDataValidations();
}
else {
var sourceRange = SpreadsheetApp.getActiveSpreadsheet().getRangeByName(cellContent);
var rule = SpreadsheetApp.newDataValidation().requireValueInRange(sourceRange, true).build();
range.setDataValidation(rule);
}
}
}
Currently, there's no way to customize the datavalidation dropdown style using Google apps script or Google sheets api. You may request this feature here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With