When I add a list item to a Google Form I can set and get choices.
If I select a list item from an existing form I cannot.
items = form.getItems();
for (i=0;i<items.length;i++){
Logger.log(items[i].getType());
if (items[i].getTitle() == 'A List'){
choices = items.getChoices();
}
}
I can see the items are of type "List" in the log but getChoices throws an error
TypeError: Cannot find function getChoices in object item....
Is this a bug in Apps Script? Is there something I can do to cast the item and make sure it is of the right type?
Thanks
Jeremy