FortiSOAR Knowledge Base
FortiSOAR: Security Orchestration and Response software provides innovative case management, automation, and orchestration. It pulls together all of an organization's tools, helps unify operations, and reduce alert fatigue, context switching, and the mean time to respond to incidents.
jhimanshu
Staff
Staff
Article Id 264104
Description This article describes expressions that can be used to display a month and year with the richtext content widget.
Scope All supported versions of FortiSOAR.
Solution

Create a richtext content widget above the chart. Select the 'Richtext Content Widget'. Under 'Editor Type', select 'Richtext Markdown'.

       
1. To display the previous month in words with the year:


{{[ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ][+(todayDate.split('/')[0]) - 2 < 0 ? 11 : +(todayDate.split('/')[0]) - 2]}} {{+(todayDate.split('/')[0]) - 2 < 0 ? +((todayDate.split(' ')[0]).split('/')[2]) - 1 : ((todayDate.split(' ')[0]).split('/')[2])}}

 

2) To display the present month in words with the year:


{{[ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ][+(todayDate.split('/')[0]) - 2 < 0 ? 11 : +(todayDate.split('/')[0]) - 1 ]}} {{((todayDate.split(' ')[0]).split('/')[2])}}

Contributors