Demo Example: Events Dashboard
The Event Dashboard represents events and allows user to view events schedule and manage them. Here is how such dashboard can look like:
To make this dashboard administrator should do actions listed below:
Create Actions and Actions Group
Create the following Actions of "Define Variable" type. Set Variable Type to Text in all actions:
Action name =
Get Previous MonthVariable name =currentDateVariable value =FORMULA[FORMAT(ADDMONTHS(DATEVALUE({$Variables.currentDate}), -1), 'yyyy-MM-dd')]Action name =
Get Next MonthVariable name =currentDateVariable value =FORMULA[FORMAT(ADDMONTHS(DATEVALUE({$Variables.currentDate}), 1), 'yyyy-MM-dd')]Action name =
Update Week 1 Start VariableVariable name =week1StartVariable value =FORMULA[STARTOFWEEK(DATEVALUE(FORMAT({$Variables.currentDate}, 'yyyy-MM-01')))]Action name =
Update Week 2 Start VariableVariable name =week2StartVariable value =FORMULA[STARTOFWEEK(DATEVALUE(FORMAT({$Variables.currentDate}, 'yyyy-MM-01'))) + 7]Action name =
Update Week 3 Start VariableVariable name =week3StartVariable value =FORMULA[STARTOFWEEK(DATEVALUE(FORMAT({$Variables.currentDate}, 'yyyy-MM-01'))) + 14]Action name =
Update Week 4 Start VariableVariable name =week4StartVariable value =FORMULA[STARTOFWEEK(DATEVALUE(FORMAT({$Variables.currentDate}, 'yyyy-MM-01'))) + 21]Action name =
Update Week 1 VariableVariable name =week1Variable value =FORMULA[FORMAT(STARTOFWEEK(DATEVALUE(FORMAT(DATEVALUE({$Variables.currentDate}), 'yyyy-MM-01'))), 'dd/MM/yyyy') + ' - ' + FORMAT(STARTOFWEEK(DATEVALUE(FORMAT(DATEVALUE({$Variables.currentDate}), 'yyyy-MM-01'))) + 6, 'dd/MM/yyyy')]Action name =
Update Week 2 VariableVariable name =week2Variable value =FORMULA[FORMAT(STARTOFWEEK(DATEVALUE(FORMAT(DATEVALUE({$Variables.currentDate}), 'yyyy-MM-01'))) + 7, 'dd/MM/yyyy') + ' - ' + FORMAT(STARTOFWEEK(DATEVALUE(FORMAT(DATEVALUE({$Variables.currentDate}), 'yyyy-MM-01'))) + 13, 'dd/MM/yyyy')]Action name =
Update Week 3 VariableVariable name =week3Variable value =FORMULA[FORMAT(STARTOFWEEK(DATEVALUE(FORMAT(DATEVALUE({$Variables.currentDate}), 'yyyy-MM-01'))) + 14, 'dd/MM/yyyy') + ' - ' + FORMAT(STARTOFWEEK(DATEVALUE(FORMAT(DATEVALUE({$Variables.currentDate}), 'yyyy-MM-01'))) + 20, 'dd/MM/yyyy')]Action name =
Update Week 4 VariableVariable name =week4Variable value =FORMULA[FORMAT(STARTOFWEEK(DATEVALUE(FORMAT(DATEVALUE({$Variables.currentDate}), 'yyyy-MM-01'))) + 21, 'dd/MM/yyyy') + ' - ' + FORMAT(STARTOFWEEK(DATEVALUE(FORMAT(DATEVALUE({$Variables.currentDate}), 'yyyy-MM-01'))) + 27, 'dd/MM/yyyy')]
Create 2 Action Groups and add actions from configured above to them (in the order specified below):
name = Get Previous Month Action Group
actions:
Get Previous Month
Update Week 1 Start Variable
Update Week 2 Start Variable
Update Week 3 Start Variable
Update Week 4 Start Variable
Update Week 1 Variable
Update Week 2 Variable
Update Week 3 Variable
Update Week 4 Variable
name = Get Next Month Action Group
actions:
Get Next Month
Update Week 1 Start Variable
Update Week 2 Start Variable
Update Week 3 Start Variable
Update Week 4 Start Variable
Update Week 1 Variable
Update Week 2 Variable
Update Week 3 Variable
Update Week 4 Variable
Create new dashboard
Go to dashboard creation wizard and create new standard dashboard.
Give it a name and description.
Select default "White" theme.
Save dashboard and go to Kanban builder.
Configure dashboard
Go to Basic Configuration and set icon:
Go to Statistics Configuration.
Add the cell and set these properties to it:
Type = Text
Value =
FORMULA[FORMAT({$Variables.currentDate}, 'MMMM, yyyy')]
Set CSS Styles to this cell:
font-size: 24pxGo to Buttons Configuration and add 3 buttons:
Button "Previous Month":
Configure handler of this button:
Type = Action Group
Value = Get Previous Month Action Group (that was created before)
Parameters = not set
Success handler:
Type = KanBan API
Value = Refresh Kanbans
Parameters = not set
Button "Next Month":
Configure handler of this button:
Type = Action Group
Value = Get Next Month Action Group (that was created before)
Parameters = not set
Success handler:
Type = KanBan API
Value = Refresh Kanbans
Parameters = not set
Button "New Event":
Configure handler of this button:
Type = SObject
Value = Event
Parameters = not set
Go to Variables Configuration and add these variables:
currentDate =
{$System.Date}week1 =
FORMULA[FORMAT(STARTOFWEEK(DATEVALUE(FORMAT({$System.Date}, 'yyyy-MM-01'))), 'dd/MM/yyyy') + ' - ' + FORMAT(STARTOFWEEK(DATEVALUE(FORMAT({$System.Date}, 'yyyy-MM-01'))) + 6, 'dd/MM/yyyy')]week1Start =
FORMULA[STARTOFWEEK(DATEVALUE(FORMAT({$System.Date}, 'yyyy-MM-01')))]week1End =
FORMULA[STARTOFWEEK(DATEVALUE(FORMAT({$System.Date}, 'yyyy-MM-01'))) + 6]week2 =
FORMULA[FORMAT(STARTOFWEEK(DATEVALUE(FORMAT({$System.Date}, 'yyyy-MM-01'))) + 7, 'dd/MM/yyyy') + ' - ' + FORMAT(STARTOFWEEK(DATEVALUE(FORMAT({$System.Date}, 'yyyy-MM-01'))) + 13, 'dd/MM/yyyy')]week2Start =
FORMULA[STARTOFWEEK(DATEVALUE(FORMAT({$System.Date}, 'yyyy-MM-01'))) + 7]week2End =
FORMULA[STARTOFWEEK(DATEVALUE(FORMAT({$System.Date}, 'yyyy-MM-01'))) + 13]week3 =
FORMULA[FORMAT(STARTOFWEEK(DATEVALUE(FORMAT({$System.Date}, 'yyyy-MM-01'))) + 14, 'dd/MM/yyyy') + ' - ' + FORMAT(STARTOFWEEK(DATEVALUE(FORMAT({$System.Date}, 'yyyy-MM-01'))) + 20, 'dd/MM/yyyy')]week3Start =
FORMULA[STARTOFWEEK(DATEVALUE(FORMAT({$System.Date}, 'yyyy-MM-01'))) + 14]week3End =
FORMULA[STARTOFWEEK(DATEVALUE(FORMAT({$System.Date}, 'yyyy-MM-01'))) + 14]week4 =
FORMULA[FORMAT(STARTOFWEEK(DATEVALUE(FORMAT({$System.Date}, 'yyyy-MM-01'))) + 21, 'dd/MM/yyyy') + ' - ' + FORMAT(STARTOFWEEK(DATEVALUE(FORMAT({$System.Date}, 'yyyy-MM-01'))) + 27, 'dd/MM/yyyy')]week4Start =
FORMULA[STARTOFWEEK(DATEVALUE(FORMAT({$System.Date}, 'yyyy-MM-01'))) + 21]week4End =
FORMULA[STARTOFWEEK(DATEVALUE(FORMAT({$System.Date}, 'yyyy-MM-01'))) + 27]
Configure Columns
Add 4 columns to the dashboard.
Name them (see table below)
Leave column width default ("auto")
Leave column "Is Active" checkbox default (checked)
Set these properties to Data Source Configuration:
Data Source Type = SObject
Data Source = Event
Set the following conditions to the proper columns (select Type = "Formula" in all):
Column name =
{$Variables.week1}Condition 1: Start Date Time >FORMULA[STARTOFWEEK(DATEVALUE(FORMAT({$Variables.currentDate}, 'yyyy-MM-01')))]T00:00:00ZCondition 2: Start Date Time <FORMULA[STARTOFWEEK(DATEVALUE(FORMAT({$Variables.currentDate}, 'yyyy-MM-01'))) + 7]T00:00:00ZColumn name =
{$Variables.week2}Condition 1: Start Date Time >FORMULA[STARTOFWEEK(DATEVALUE(FORMAT({$Variables.currentDate}, 'yyyy-MM-01'))) + 7]T00:00:00ZCondition 2: Start Date Time <FORMULA[STARTOFWEEK(DATEVALUE(FORMAT({$Variables.currentDate}, 'yyyy-MM-01'))) + 14]T00:00:00ZColumn name =
{$Variables.week3}Condition 1: Start Date Time >FORMULA[STARTOFWEEK(DATEVALUE(FORMAT({$Variables.currentDate}, 'yyyy-MM-01'))) + 14]T00:00:00ZCondition 2: Start Date Time <FORMULA[STARTOFWEEK(DATEVALUE(FORMAT({$Variables.currentDate}, 'yyyy-MM-01'))) + 21]T00:00:00ZColumn name =
{$Variables.week4}Condition 1: Start Date Time >FORMULA[STARTOFWEEK(DATEVALUE(FORMAT({$Variables.currentDate}, 'yyyy-MM-01'))) + 21]T00:00:00ZCondition 2: Start Date Time <FORMULA[STARTOFWEEK(DATEVALUE(FORMAT({$Variables.currentDate}, 'yyyy-MM-01'))) + 28]T00:00:00Z
Open Body Configuration tab:
Select Cards in Row = 1
Configure CSS Styles:
background-color: FORMULA[IF(STARTOFWEEK({$Variables.week1start})
= STARTOFWEEK({$System.Date}), '#feffea', '#ffffff')]Configure Card
Add 1 card to dashboard
Set Data Source Type to "Event"
Set card layout:
Basic configuration:
Layout body type = Standard
Position = right
All checkboxes = false
Header configuration:
Title settings:
Text = {Event.Subject}
Footer configuration:
Add button "Open Event":
Configure handler of this button:
Type = SObject
Value = {Event.Id}
Parameters = not set
Add tab to Tabs configuration:
Label = Details
Title = Details
Icon = standard:lead_list
Layout = Standard with 5 rows:
1
Type
Type
2
Assigned To
Account ID:Account Name
3
Start Date Time
Start Date Time
4
Duration
Duration
5
Location
Location
Open Card Compact Layout editor :
add CSS Styles to the card settings (1):
background-color: #ffffff
border-left: 3px solid #15db00Change the Value of default existing Card Component to {Event.Subject} (2).
Set its width to 100 (leave default)
Expend "Styles" section and set the following:
text-decoration: underline
color: #006dcc
display: contents
flex: initialAdd text component (3) below the previous
Set its Value and Title to {Event.Who.Name}
Leave its width default (100)
Add text component (4) below
Set its value to FORMULA[FORMAT({Event.StartDateTime})]
Set its Title to {Event.StartDateTime}
Leave its width default (100)
Last updated