The Google script I have gets data from a sheet column and updates the choices in a Forms Dropdown list item. However while the item in the source is 'mystring' the loaded option is mystring with added ",". .... Thus "Dog" in the source becomes "Dog," in the Forms Question drowpdown list of items. What is wrong with my script?
function updateFormFromData() {
var ss = SpreadsheetApp.openByUrl(
'https://docs.google.com/spreadsheets/d/'<mysheetID>'/edit');
var sheetAL = ss.getSheetByName('FormDataAL');
var lastAL = sheetAL.getLastRow();
console.log(lastAL);
options = sheetAL.getRange('A2:' + lastAL).getValues();
console.log(options)
const form = FormApp.getActiveForm(),
allItems = form.getItems();
Logger.log(allItems);
formQ2 = allItems[2].asListItem();
formQ2.setChoiceValues(options);
var sheetMZ = ss.getSheetByName('FormDataMZ');
var lastMZ = sheetMZ.getLastRow();
console.log(lastMZ);**strong text**
options2 = sheetMZ.getRange('A2:' + lastMZ).getValues();
console.log(options2)
formQ3 = allItems[4].asListItem();
formQ3.setChoiceValues(options2);
}