In google sheet, is it possible to restrict someone automatically when one or more conditions are met?
For instance:
- A test is given to a candidate via googlesheet
- Administrator of the test want to restrict any other participants to edit it when 20th of April 2022 is passed.
Google script is okay if can really meets the need.
CodePudding user response:
If this is a one-time exercise, you can simply put all the spreadsheets in a Google Drive folder, share the folder with the participants with edit rights, send each participant a link to "their" spreadsheet only, and on the deadline date change the sharing to view-only.
Another easy approach would be to create a form for the test, instead of sharing a spreadsheet with each participant. You can direct form responses to a destination spreadsheet. All responses will automatically appear in a tab in the spreadsheet in a row-oriented fashion and are thus easy to process with spreadsheet functions such as query()
and filter()
.
CodePudding user response:
On Google Drive, you can set up an access expiration date for a file, but the access level allowed is Viewer or Commenter.
For more info, refer to this article.
In case you want to do this using a script, unfortunately there isn't a way to do it "automatically". Whatever the implementation logic will be, you would still have to be in control of executing an update of the affected file permissions when the target date comes.
In this case, you can check permissions.list() and permissions.update() for more information.