The enabledExpression setting is one of the settings of an Action plug-in that can be configured in its configuration file. For more information, see Assets Server Action plug-ins - configuration settings.
Required | No |
Description |
Expression to check if the current selection of assets is valid. The plug-in 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 plug-in works purely with video files, so you want make sure that there are videos selected. |
Basic setting |
|
Methods
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.
Examples
Enabled expression samples are combined with Action plug-in setting - filterExpression.
Comment
Do you have corrections or additional information about this article? Leave a comment! Do you have a question about what is described in this article? Please contact Support.
0 comments
Please sign in to leave a comment.