1

Is it possible to get pop-up suggestion while typing in google script for functions created by user? Similar to built-in functions: SpreadsheetApp. -->getActiveSheet() but for my functionName() to see arguments and type of return value?

Rubén
  • 34,714
  • 9
  • 70
  • 166

1 Answers1

1

Yes.

  1. If you mean custom functions in the Google Script environment, then yes, you just need to create a library with your functions. Here is the link with instructions to create your own library. From the Libraries documentation:

    You can use your included library just as you would use a default service. For instance, if you have chosen Test as an identifier for your library, just type Test immediately followed by a period to see autocomplete information listing the methods of the library.

    By the way, the shortcut to see autocomplete is Ctrl+Space.

  2. If you mean custom functions in Google Sheets, then yes you can. You just need to add a comment by following guidelines below. From the Autocomplete documentation:

    Google Sheets supports autocomplete for custom functions much like for built-in functions. As you type a function name in a cell, you will see a list of built-in and custom functions that matches what you enter.

    Custom functions will appear in this list if their script includes a JsDoc @customfunction tag, as in the DOUBLE() example below.

Antoine Colson
  • 660
  • 5
  • 8