Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: PFUN-27083
Info

available Available since version Paper Plane 11.0.

This example shows how to create a contextual button on a PA Analytics chart rendered in portlet of a dashboard portlet. Click on Clicking the button will cause result in creation of a new Action Item with a given Action Item Type, and with provided values.

...

...

Info

This button is visible only when you move your mouse over the chart.

To configure such a Contextual Action, on configuration page for go to Advanced Configuration Options, and add a new application property with:

  • the The name must start with prefix “pfxContextualActionpfxContextualAction_, for example “pfxContextualActionpfxContextualAction_DashboardAction”DashboardAction.

  • with The property contains the following JSON value:

Code Block
languagejson
{
    "name": "actin_create_simple_action_from_dashboard",
    "labelTranslations": {
        "": "Create Action"
    },
   "page": "dashboardPage",
    "order": 0,
    "contextLinking": {
        "targetPage": "newActionPage",
        "targetPageTarget": "new",
        "targetPageEntityType": "ActIn_DashboardSimpleAction",
        "targetPageInputs": {
            "sourceContext" : {
                "ContextLinkingButton_DashboardName": "{dashboardName}",
                "ContextLinkingButton_PortletName": "{portletName}",
                "ContextLinkingButton_DashboardPortletPreference": "{dashboardPreference}",
                "ContextLinkingButton_DashboardInputs": "{dashboardInputs}"
            }
        },
		"targetPageFields":{
			"originatorTypedId": "{dashboardTypeddIddashboardTypedId}",
			"summary": "{dashboardName}-{portletName}-action",
			"description": "This action was created from dashboard {dashboardName} with portlet: {portletLabel}"
		}
    }
}
Info

In version Caribou Lou 14.0, a typo in the dashboardTypedId variable was corrected. To maintain backward compatibility, both variants are supported and will function fully. You can use either dashboardTypedId or dashboardTypeddId.

Replacements will be changed at the moment when the system creates the button on an actual page in front-end.

  • {dashboardName}

  • {dashboardInputs}

  • {dashboardPreference}

  • {dashboardTypeddId}

  • {portletName}

  • {portletLabel}

  • {resultType}

For details on the frontend. See also a list of available placeholders for dashboardPage.

For details on context linking parameters, see Context Linking.

...