Để gọi một enum, bạn gọi lớp mẹ, tên và thuộc tính của enum đó. Ví dụ:
FormApp.DestinationType.SPREADSHEET.
// Open a form by ID and create a new spreadsheet.constform=FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');constss=SpreadsheetApp.create('Spreadsheet Name');// Update the form's response destination.form.setDestination(FormApp.DestinationType.SPREADSHEET,ss.getId());
Thuộc tính
Thuộc tính
Loại
Mô tả
SPREADSHEET
Enum
Một bảng tính Google Trang tính làm đích đến cho câu trả lời của biểu mẫu.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2024-12-22 UTC."],[[["`DestinationType` is an enum defining where form responses can be sent, with all responses saved in the form's response store by default."],["It allows specifying a Google Sheet as a destination for form responses using `FormApp.DestinationType.SPREADSHEET`."],["You can set the destination of a form using the `setDestination()` method, providing the destination type and ID."]]],[]]