我有一个代码,可以将表单链接到电子表格上的数据,但是它以下拉样式工作。
function updateForm(){
var formID = '1zxb6srxC_V1q2ic-dAq3LSFkQ7VFSglXXB43yuhuBRk'
var NameInForm = 'Names of People'
var NamedRange = 'CustomNames'
var form = FormApp.openById(formID);
AllFormItems = form.getItems();
for (i=0; i < AllFormItems.length ; ++i) {
FormTitle = AllFormItems[i].getTitle();
if (FormTitle == NameInForm) {
FormItemId = AllFormItems[i].getId();
}
}
if (FormItemId == 0) {
return;
}
FormItemList = form.getItemById(FormItemId).asListItem();
ss = SpreadsheetApp.getActive();
SheetItemRange = ss.getRangeByName(NamedRange);
SheetItems = SheetItemRange.getValues();
var SheetItemChoices = []
for (i=0; i < SheetItems.length; ++i) {
SingleSheetItem = SheetItems[i][0].toString().trim();
if (!(SingleSheetItem=='')) {
SheetItemChoices.push(FormItemList.createChoice(SingleSheetItem));
}
}
FormItemList.setChoices(SheetItemChoices);
}
现在,我希望它用作数字>> BetWeen,如何修复代码?