Vasek
Vasek

Reputation: 33

Switching between Filter views using apps script

I would like to create a custom menu with items to switch between filter views on particular sheet. Is there any way? I need filter views, because of sorting and filtering but still keeping edit option. Filter function doesn't work due to that fact.

Upvotes: 3

Views: 3962

Answers (4)

Ricardas
Ricardas

Reputation: 216

If I understand it right, the simple solution/workaround for you would be to make custom menu which reopens the spreadsheet with the filter view id in url. GAS doesn't allow to open new browser window, as far as I know, but there is a workaround with dialog box for that too.

Upvotes: 1

Wicket
Wicket

Reputation: 38425

It's not possible to use a custom menu to switch between filter views as Google Apps Script hasn't methods to access the filter views settings (i.e. activate a filter view) for the active user.

One option is to use a custom menu to show a dialog or sidebar to show the instructions to use filter views to the active user.

Resources

Upvotes: 0

Ryan Roth
Ryan Roth

Reputation: 1424

It is possible to access and edit filters using the Advanced Sheets service, as seen in this example.

Upvotes: -4

Juan Diego Antezana
Juan Diego Antezana

Reputation: 912

Filter View doesn't have support on apps Script yet It's an old feature request

Upvotes: 7

Related Questions