Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I view Script Properties in the new Google Apps Script IDE

I've been switched over to the new Google Apps Script IDE. I used to be able to click FILE > PROJECT PROPERTIES to access global properties for files

I cannot for the life of me find how you get there now??

anyone know?

p.s I can switch back to legacy for now but no good once this is removed....

like image 226
MrPea Avatar asked Jan 15 '21 17:01

MrPea


People also ask

How do I view Google scripts?

To access this toggle click the Google Apps Script API label in the Settings panel. This opens a new panel with warning text and a toggle switch. Access to your script projects is toggled off by default as a security precaution.

What is script property?

Script Properties are key-value pairs stored by a script in a persistent store. UserProperties. User Properties are key-value pairs unique to a user.

How do I view scripts in Google Sheets?

Where Is the Script Editor in Google Sheets? In Google Sheets, you can find the Script Editor in the Extensions tab.


3 Answers

I had faced the same problem while adjusting the time zone in the Apps Script new editor. The easiest way I found was to click on Use Legacy editor on the top right corner of the new editor. Then I retrieved the legacy File menu. After setting the time zone, I clicked Use new editor. Setting was maintained when I returned back to the new editor.

How it looks in the new editor:
How it looks in the new editor

How it looks in the Legacy editor:

How it looks in the Legacy editor

like image 100
A Rezika Avatar answered Nov 16 '22 03:11

A Rezika


This feature has already been reported in the issue tracker as a future request:

enter image description here

Star ⭐ the request and make it more visible.

Apparently, the google developer replied the following:

Unfortunately, even though I couldn't find the script properties either, this is a feature related to the new editor rather than directly to Apps Script functionallities or its API.

Therefore, the right place to file this feature request is on the top right question mark button of the editor and then selecting Send feedback as this will send your feature request to the right team.

Hopefully it will be resolved soon but you can increase its popularity by clicking on the start button.

Workaround until the issue is resolved:

Access the project properties via the PropertiesService class:

console.log(PropertiesService.getScriptProperties().getProperties());

like image 23
soMarios Avatar answered Nov 16 '22 02:11

soMarios


To see, change or delete Script properties, the most reliable way to do that is to write some code that uses Properties Service.

For example, you can log Script Property values as follows:

function getAllScriptProps() {

  var v = PropertiesService.getScriptProperties().getProperties();
  Logger.log(v)
}

You can continue to use the legacy editor to view and manage Script Properties, but the UI has always had bugs in it. It will display Script Properties, but it doesn't always update or delete properties correctly.

Script Properties are part of Properties Service, which is separate from the Apps Script API. Properties can be tied to a user, a document, or the Apps Script project file. Even though the Apps Script API is for accessing Apps Script files, it has no way to list or update Script Properties.

The capabilities of the new IDE seem to be closely related to what the Apps Script API can access.

If they do decide to allow the new IDE permission to access your Script Properties, and add a UI to manage them, it would probably be announced in the release notes.

Apps Script Release Notes

I'm guessing that the legacy editor will eventually be deprecated, and if a new UI to manage Script Properties does not get implemented, then you'll need to use code.

like image 43
Alan Wells Avatar answered Nov 16 '22 02:11

Alan Wells