Returns key-value storage private to the current user.
class PropertiesService method .getUserProperties()
PropertiesService is the Apps Script service.
.getUserProperties() is the method name you will see after a dot in your code.
What it does
Why it's used
- Save per-user preferences like last filter or theme.
- Keep each teammate's options separate on a shared sheet.
Common errors
- Forgetting parentheses on getUserProperties. Write PropertiesService.getUserProperties(), not PropertiesService.getUserProperties or getUserProperties by itself.
- Skipping dots between chained calls. Each step needs a dot, like PropertiesService.getUserProperties().
- Adding spaces where they do not belong. Write PropertiesService.getUserProperties(), not PropertiesService .getUserProperties(), PropertiesService.getUserProperties (), or PropertiesService . getUserProperties().
- Wrong capitalization. Use PropertiesService and getUserProperties, not propertiesservice or getuserproperties.
Explore
Related methods
-
.getProperties()
Returns all stored key-value pairs.
-
.getScriptProperties()
Returns key-value storage shared by everyone using the script.
-
.getDocumentProperties()
Returns key-value storage tied to the current spreadsheet or doc.
-
.getProperty()
Reads a single stored value by key.
-
.setProperties()
Saves multiple key-value pairs at once.
More Apps Script
Better Sheets tutorials
No tagged tutorials yet. Fetch Apps Script from the harvest table and this page fills automatically.