Make a Smart Action available across all collections

Expected behavior

I have created a smart action on one of my collections and it is working as expected. What I would like to know is if there is an easy way to make that smart action available to all collections? (i.e. without having to manually enter it into every forest/<collection.js> file?

Actual behavior

Currently, I have to define a smart action on a particular collection, and only when the user is viewing that particular collection is the action made available.

Context

Our project has over 20 tables, and we would like a single smart action to apply to all of them.

  • Package Version: Node v10.15.3
  • Express Version:
  • Sequelize Version:
  • Database Dialect:
  • Database Version: postgres (PostgreSQL) 11.8
  • Project Name: NSF_Projects

Hey @jingram,

Welcome to our community! :wave:

This is true, a smart action is limited to one collection.
It’s not possible for now to create an action available to all collections.

Just out of curiosity, why do you want to have an action available to all collections? What is your usecase?

Thanks.

Our use case is that we would like to apply a global filter. All of our collections are related to one collection (through belongsTo, belongsTo through, etc.), and we would like to create a global filter that, when selected, filters all collections at once.

1 Like

And thanks for the super quick reply!

1 Like

Ok @jingram, thanks for detailing your usecase!
I’ll add your request into our Product Board.
Cheers!