Google 表单对下拉选项数量的限制

Ale*_*raz 4 google-apps-script google-forms

以前,我每周使用 Google Apps 脚本填充 Google 表单中下拉列表问题的选项。一道题同时有多达3600个选择。本周,当以减少的选择数量(大约 2000 个)运行相同的脚本时,我通过 script.google.com 收到以下错误:“无法设置选择。您超出了最大选择数量。” 可添加的选项数量是否有新的限制?我在网络上找不到列出的任何地方。

重现问题的代码片段:

var sheetUrl = 'https://docs.google.com/spreadsheets/d/xxxxxxxxxxxxxxxxxxxxx/edit';
var sheet = SpreadsheetApp.openByUrl(sheetUrl).getSheetByName("Form Responses 1");
var data = sheet.getDataRange().getValues();
var formExample = FormApp.openById('xxxxxxxxxxxxxxxxxxxxxxxxxx');
var listOfCustomers= formExample.getItemById(1234567890);
var customerChoices = [];
for (var i = 0; i < data.length; i+=1){
  customerChoices.push(listOfCustomers.asListItem().createChoice(data[i][0]));
}
listOfCustomers.asListItem().setChoices(customerChoices);
Run Code Online (Sandbox Code Playgroud)

小智 5

https://issuetracker.google.com/issues/63395462

mc...@google.com #4 2017 年 7 月 18 日 01:55PM

状态:不会修复(预期行为) 自 6 月以来,我们对可添加到 Apps 脚本中的表单下拉列表中的选项数量施加了限制。当前限制为 1,000,但可能会发生变化。如果您需要提供更多选项,请考虑使用自由格式文本字段、多个下拉列表或自定义 Web 表单。