A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.google.com/apps-script/reference/properties/properties-service below:

Class PropertiesService | Apps Script

Class PropertiesService

Stay organized with collections Save and categorize content based on your preferences.

PropertiesService

Allows scripts to store simple data in key-value pairs scoped to one script, one user of a script, or one document in which an add-on is used. Properties cannot be shared between scripts. For more information about when to use each type of property, see the guide to the Properties service.

// Sets three properties of different types.
const documentProperties = PropertiesService.getDocumentProperties();
const scriptProperties = PropertiesService.getScriptProperties();
const userProperties = PropertiesService.getUserProperties();

documentProperties.setProperty('DAYS_TO_FETCH', '5');
scriptProperties.setProperty(
    'SERVER_URL',
    'http://www.example.com/MyWeatherService/',
);
userProperties.setProperty('DISPLAY_UNITS', 'metric');
Detailed documentation getDocumentProperties()

Gets a property store (for this script only) that all users can access within the open document, spreadsheet, or form. It is only available if the script is published and executing as an add-on or if it is bound to a Google file type. When document properties are not available this method returns null. Document properties created by a script are not accessible outside that script, even by other scripts accessing the same document.

Return

Properties — a property store for this script only that all users of the current document can access, or null if the script is not either an add-on or bound to a Google Workspace file

getScriptProperties()

Gets a property store that all users can access, but only within this script.

Return

Properties — a property store that all users of the script can access

getUserProperties()

Gets a property store that only the current user can access, and only within this script.

Return

Properties — a property store that only the current user of the script can access

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-12-02 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-12-02 UTC."],[[["The Properties Service lets Apps Script store simple data as key-value pairs, with different scopes for scripts, users, and documents."],["It offers three methods to access properties: `getDocumentProperties()`, `getScriptProperties()`, and `getUserProperties()`."],["`getDocumentProperties()` provides property storage accessible to all users within a specific document, spreadsheet, or form where the script is running."],["`getScriptProperties()` allows storing properties accessible to all users, but only within the context of the current script."],["`getUserProperties()` provides a property store specific to the current user and accessible only within the current script."]]],["The `PropertiesService` stores data in key-value pairs, accessible via `getDocumentProperties`, `getScriptProperties`, and `getUserProperties`. `getDocumentProperties` stores data within a specific document, accessible to all users. `getScriptProperties` stores data within a script, accessible to all users. `getUserProperties` stores data for a single user within a script. The example code demonstrates setting properties using each method: `setProperty`. Each method returns a `Properties` object, which is a property store.\n"]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4