Logo Help Center

Elvis 4 action plug-ins setting - enabledExpression

Elvis 4 action plug-ins setting - enabledExpression

(7) Optional setting

Expression to check if the current selection of assets or folders is valid. The plugin buttons and menu items are enabled or disabled based on the result of the expression. The result of the enabledExpression is combined with the result of the requiredPermissionMask validation.

For example, the plugin works purely with video files, so you want make sure that there are videos selected.



There are several methods available in the elvisContext class to quickly determine if an action should be enabled based on the current selection.

  • elvisContext.hasSelection(). Returns true if there are item(s) selected.
  • elvisContext.hasFilteredSelection(). Returns true if one of the items matches the filterExpression or if flattenContainersInSelection is true and one of the items is a Container.
  • elvisContext.isSingleItem(). Returns true if there is one asset selected.


Enabled expression samples are combined with Action plugin setting - filterExpression.

Was this article helpful?
0 out of 0 found this helpful / Created: / Updated:
Have more questions? Submit a request


Please sign in to leave a comment.