Question

Dashboard Page as a Page Widget

Hello Team,

 

How to embed list dashboard as a widget on page ? I know that this is impossible on page wizard but may be done through source code modification.

Do You have any example or is there any standard page with such solution ?

 

Regards,

Marcin Kott

Like 0

Like

4 comments

Hi Marcin,

 

You need to study the code that is added to the page schema when adding a chart dashboard for example. Here are some steps I took to add an "Account" list dashboard to the contact edit page:

 

1) Add a chart widget to the page with some basic settings.

2) Study the code added to the ContactPageV2:

modules part

"Chart991aed38-448b-475e-a2f6-b14db418e419": {
				"moduleId": "Chart991aed38-448b-475e-a2f6-b14db418e419",
				"moduleName": "CardWidgetModule",
				"config": {
					"parameters": {
						"viewModelConfig": {
							"widgetKey": "Chart991aed38-448b-475e-a2f6-b14db418e419",
							"recordId": "2ea238bd-5e38-4f24-86fe-184e687218d1",
							"primaryColumnValue": {
								"getValueMethod": "getPrimaryColumnValue"
							}
						}
					}
				}
			}

and the diff part:

{
				"operation": "insert",
				"name": "Chart991aed38-448b-475e-a2f6-b14db418e419",
				"values": {
					"layout": {
						"colSpan": 12,
						"rowSpan": 10,
						"column": 0,
						"row": 3,
						"layoutName": "ContactGeneralInfoBlock",
						"useFixedColumnHeight": true
					},
					"itemType": 4,
					"classes": {
						"wrapClassName": [
							"card-widget-grid-layout-item"
						]
					}
				},
				"parentName": "ContactGeneralInfoBlock",
				"propertyName": "items",
				"index": 6
			}

 

3) Go to the "SysWidgetDashboard" table and find the added record (by the value from the "recorded" attribute of the modules part):

Pay attention that only one column is important here - Items.

4) Create an example of the list dashboard elsewhere in the system (for example in the "Dashboards" section). Find this dashboard by its caption in the SysDashboards table

5) Copy the content of the Items column from the SysDashboards table and insert a new record to the SysWidgetDashboard table.

6) Add two parts to the ContactPageV2:

one to the modules part (pay attention that the "recorded" attribute value should be in lower case):

"DashboardGrida489e88ca8e3": {
				"moduleId": "DashboardGrida489e88ca8e3",
				"moduleName": "CardWidgetModule",
				"config": {
					"parameters": {
						"viewModelConfig": {
							"widgetKey": "DashboardGrida489e88ca8e3",
							"recordId": "2ea238bd-5e38-4f24-86fe-184e687218d1",
							"primaryColumnValue": {
								"getValueMethod": "getPrimaryColumnValue"
							}
						}
					}
				}
			}

and one to the diff:

{
				"operation": "insert",
				"name": "DashboardGrida489e88ca8e3",
				"values": {
					"layout": {
						"colSpan": 12,
						"rowSpan": 10,
						"column": 12,
						"row": 3,
						"layoutName": "ContactGeneralInfoBlock",
						"useFixedColumnHeight": true
					},
					"itemType": 4,
					"classes": {
						"wrapClassName": [
							"card-widget-grid-layout-item"
						]
					}
				},
				"parentName": "ContactGeneralInfoBlock",
				"propertyName": "items",
				"index": 7
			},

7) The widget should now appear on the page:

and you can also go to the wizard and specify additional filtration:

Best regards,

Oscar

This is really something I need to use often. Would be awesome if this was available through no-code in page designer/wizard

Oscar Dylan,

 

This time we have to embedded pivot table on page but when i designed dashboardgrid to display pivot table then on page widget this content is rendered as a list instead of pivot table.

 

Is this a matter of wrapClassName or there is no option to display dashboard list as a pivot table on page widget ?

 

Best Regards,

Marcin

 

Marcin Kott,

Have you found an option to display pivot table on page?



Thank you!

Vladimir

Show all comments