Where does Google Script PropertiesService store d

2019-08-14 19:37发布

问题:

Where exactly does the Google Script PropertiesService store user property data?

For example, what if I want to clear the user properties without having to run a function with the deleteAllProperties() method? To phrase it yet another way, is there a way to access Google Script properties from the local browser or OS?

From Form.html

<input onclick="google.script.run.setProperties(this.parentNode.parentNode);" type="submit" value="Save" >

From Code.gs

function setProperties(form) {
  var filledForm = PropertiesService.getUserProperties().setProperty("FORM", form);
}

回答1:

Google replied, "Properties are stored on the server, and there's no way to delete them locally as you asked on stack overflow since they don't exist locally."

That adequately answers my question. Thanks to Garrett for going above and beyond to ping Google devs to get this information.



回答2:

Open the Script in the Script Editor, go to File>Project Properties>User Properties. From your explanation, I am assuming these are the properties you are trying to delete.



回答3:

there is no way of accessing the user properties from PropertiesService, other than by code (as far as i know)

what you see under File>Project Properties>User Properties, are the old deprecated user properties, that have user's global scope, instead of per script scope as the new user properties