Skip to main content

IDashboard

This is the programmatic interface of the Dashboard. It is created during the dashboard initialization phase.

Properties

NameTypeDescription
CustomDataanyReturns the dashboard object's custom data that was specified when the dashboard was opened.
EventsIEventsReturns the event registering interface of the IDashboard interface.
IsPopupDashboardbooleanIndicates whether the dashboard is opened in an own dialog
instead of the embedded panes (right pane or listing pane).
ShellFrameIShellFrameThe Shellframe for the dashboard.
WindowIWindowReturns the dashboard's underlying window object.

Methods

NameDescription
ShowMessageShows the default M-Files message box with the specified content and appearance.
ShowPopupDashboardShows a dashboard in popup window.
UpdateCustomDataRefreshes React metadata card content.
WaitForCloseWait for close dashboard.

Events

CustomDataChanged

Custom data on dashboard has changed.

MFiles.Event.CustomDataChanged

Arguments:

  • data : any New custom data for the dashboard

Example Code

const eventHandle = await dashboard.Events.Register(
MFiles.Event.CustomDataChanged,
(
data, // `any`
) => {
// Handle event
},
);

// Later unregister the event
dashboard.Events.Unregister(eventHandle);

Refresh

MFiles.Event.Refresh

Event has no arguments

Example Code

const eventHandle = await dashboard.Events.Register(
MFiles.Event.Refresh,
() => {
// Handle event
},
);

// Later unregister the event
dashboard.Events.Unregister(eventHandle);

Started

Sent when the object turns to started state.

MFiles.Event.Started

Event has no arguments

Example Code

const eventHandle = await dashboard.Events.Register(
MFiles.Event.Started,
() => {
// Handle event
},
);

// Later unregister the event
dashboard.Events.Unregister(eventHandle);

Stop

Sent before the object is stopped.

MFiles.Event.Stop

Event has no arguments

Example Code

const eventHandle = await dashboard.Events.Register(MFiles.Event.Stop, () => {
// Handle event
});

// Later unregister the event
dashboard.Events.Unregister(eventHandle);