Defining the action properties
Action properties configure the action or provide information to the action during runtime.
You can define additional properties that are passed into the action's constructor. There is no limit to the set of property attributes. The properties can be one of the default properties or can be properties that are unique to the action.
Each action can have at most one defined actionProperty. The property value syntax is a JSON object and each key in the object is another property.
insert into cffolio.folio_action_property (value, folio_action_id, folio_action_property_type_id)
values('action_property_value',
(select folio_action_id from cffolio.folio_action where stereotype='stereotype'),
(select folio_action_property_type_id from cffolio.folio_action_property_type where stereotype='actionProperty'))
- action_property_value
- A JSON object string that defines the action's properties.
- stereotype
- The action's stereotype.
Available action_property_value JSON keys
The available JSON keys are as follows:
- includeOn
- A JSON array of predefined UI containers that define where to place the action.
- For workflow actions, this value is ignored.
- For More Actions menu actions, use one or more of the following values:
- inbox
- Include in the More Actions menu in the In-Baskets page.
- details
- Include in the More Actions menu in the Details page summary.
- card
- Include in the More Actions menu in each of the cards.
- relationships
- Include in the More Actions menu in the Relationships view.
- For
Menu actions, use hamburger. - For Taskbar actions, use dock.
- For view switcher actions, this value is ignored.
- pages
- A JSON array of ICFM page names where the action
is allowed.
- For workflow actions, this value is ignored.
- For More Actions menu actions, this value is ignored.
- For
Menu actions, this value defines which page shows the action in its hamburger
menu. - For Taskbar actions, this value defines which page shows the action in its Taskbar.
- For view switcher actions, this value is ignored.
- order
- A number that defines the order of the action relative to the other actions in the set. If this
value is not defined, the default value of 0 is used.
- For workflow actions, this value is ignored.
- For More Actions menu actions, this value defines the relative order within the More Actions menu.
- For Taskbar actions, this value defines the relative order within the Taskbar.
- For view switcher actions, this value is ignored.
- readOnly
- A boolean value that indicates whether the action is disabled when the user is in read-only
mode. When the value is set to true, the action is disabled when the item is in
read-only mode, such as when an investigation is locked by another user. If this value is not
defined, he default value of false is used.
- For workflow actions, this value is ignored.
- For More Actions menu actions, this value indicates whether the action is enabled in the menu if the user is in read-only mode.
- For
Menu actions, this value indicates whether the action is enabled in the menu
if the user is in read-only mode. - For Taskbar actions, this value indicates whether the action is enabled in the menu if the user is in read-only mode.
- For view switcher actions, this value is ignored.
- css
- The URL of a CSS file to load. The CSS file must contain the iconClass property value.
- For workflow actions, this value defines the CSS file to dynamically load when the action is created in the UI.
- For More Actions menu actions, this value defines the CSS file to dynamically load when the action is created in the UI.
- For
Menu actions, this value defines the CSS file to dynamically load when the
action is created in the UI. - For Taskbar actions, this value defines the CSS file to dynamically load when the action is created in the UI.
- For view switcher actions, this value is ignored.
- iconClass
- A CSS class name. This property must be defined in the CSS file that is loaded by the
css property.
- For workflow actions, this value defines the CSS class name to use for the action's icon image.
- For More Actions menu actions, this value defines the CSS class name to use for the action's icon image.
- For
Menu actions, this value defines the CSS class name to use for the action's
icon image. - For Taskbar actions, this value defines the CSS class name to use for the action's icon image.
- For view switcher actions, this value is ignored.
- alwaysShowOn
- A JSON array of ICFM page names.
- For workflow actions, this value is ignored.
- For More Actions menu actions, this value is ignored.
- For
Menu actions, this value is ignored. - For Taskbar actions, this value defines the ICFM pages where the action is hidden when it is created. If this value is not defined or the current page is not in the set of defined pages, the action is displayed (not hidden) when it is created.
- For view switcher actions, this value is ignored.
- viewName
- The unique name for an action in the view switcher.
- For workflow actions, this value is ignored.
- For More Actions menu actions, this value is ignored.
- For
Menu actions, this value is ignored. - For Taskbar actions, this value is ignored.
- For view switcher actions, this value defines the unique name to identify the action.
- custom properties
- Defines any additional custom property as required by the action's JavaScript widget. Call this.getActionPropertyByKey("property_name") from within the action JavaScript widget code to retrieve the value of property_name from the action's actionProperty definition.
Example
The following example adds the custom action to the More Actions menu on
the Details page and to the More Actions menu on each related
investigation.
insert into cffolio.folio_action_property (value, folio_action_id, folio_action_property_type_id)
values
('{"includeOn": ["details", "relationships"], "order": 30, "readOnly": true}',
(select folio_action_id from cffolio.folio_action where stereotype='mystereotype'),
(select folio_action_property_type_id from cffolio.folio_action_property_type
where stereotype='actionProperty'))