In environments where there are a large number of reports scheduled as part of business-as-usual (BAU) operations on any given day, it is helpful to see these schedules summarized in textual form.
This is best represented in Identity Panel in a report.
Custom Rule Function Dependencies
The following custom rule functions must first be in place:
| Function Name | Description | Rule |
| GetScheduleWeekofMonth(monthNum) | Return the relative week of month matching a month number between 0 and 4 |
Switch( |
| GetScheduleDayofWeek(dayNum) | Return the day of week matching a day number between 0 and 6 |
Switch( |
The following JSON snippets will assist in installing the above functions to your environment (Settings/Environment Settings/Custom Rule Functions):
{
"$type": "SoftwareIDM.PanelModel.Rules.RuleFunction, SoftwareIDM.PanelModel",
"Name": "GetScheduleWeekofMonth(monthNum)",
"Kind": "Rule",
"Description": "Return the relative week of month matching a month number between 0 and 4",
"Rule": "Switch(\n\tmonthNum == \"0\", \"First\",\n\tmonthNum == \"1\", \"Second\",\n\tmonthNum == \"2\", \"Third\",\n\tmonthNum == \"3\", \"Fourth\",\n\tmonthNum == \"4\", \"Fifth\",\n)\n",
"Implementation": null
},
{
"$type": "SoftwareIDM.PanelModel.Rules.RuleFunction, SoftwareIDM.PanelModel",
"Name": "GetScheduleDayofWeek(dayNum)",
"Kind": "Rule",
"Description": "Return the day of week matching a day number between 0 and 6",
"Rule": "Switch(\n\tdayNum == \"0\", \"Sunday\",\n\tdayNum == \"1\", \"Monday\",\n\tdayNum == \"2\", \"Tuesday\",\n\tdayNum == \"3\", \"Wednesday\",\n\tdayNum == \"4\", \"Thursday\",\n\tdayNum == \"5\", \"Friday\",\n\tdayNum == \"6\", \"Saturday\"\n)\n",
"Implementation": null
}
Report Definition
The following JSON report definition can be uploaded to your environment (Settings/Reports):
{
"Data": [
{
"$type": "SoftwareIDM.ReportingModule.Models.Report, SoftwareIDM.ReportingModule",
"Id": "62187e5b-c562-434b-a45c-f35c18d55a5f",
"Name": "Report Schedules",
"UserId": null,
"UserProfile": true,
"Tags": null,
"Roles": [
"Admin"
],
"CacheExpiration": "01:00:00",
"Description": "Schedule Name / Enabled / Scheduled Times",
"Parameters": [],
"DataSets": [
{
"$type": "SoftwareIDM.ReportingModule.Models.QueryData, SoftwareIDM.ReportingModule",
"Clauses": [],
"SubQueries": [],
"MapRule": "",
"MemoRules": [],
"Aliases": null,
"Name": "All schedules",
"Type": "SoftwareIDM.PanelModel.Models.Schedule, SoftwareIDM.PanelModel",
"Include": [
"Name",
"Enabled",
"Times"
],
"Limit": null
}
],
"ReportSets": [],
"Relations": [],
"FieldProjections": [
{
"$type": "SoftwareIDM.ReportingModule.Models.Projection, SoftwareIDM.ReportingModule",
"Name": "Name",
"RelationName": "",
"RelationSide": null,
"ValueRule": "Name"
},
{
"$type": "SoftwareIDM.ReportingModule.Models.Projection, SoftwareIDM.ReportingModule",
"Name": "Enabled",
"RelationName": "",
"RelationSide": null,
"ValueRule": "Enabled"
},
{
"$type": "SoftwareIDM.ReportingModule.Models.Projection, SoftwareIDM.ReportingModule",
"Name": "Times",
"RelationName": "",
"RelationSide": null,
"ValueRule": "If(\n\tTimes.Count == 0, \n\t\"None\", \n\tJoin(\n\t\t\"; \"\n\t\t, Map(\n\t\t\tTimes, \n\t\t\tSwitch(\n\t\t\t\tAnd(Interval,Until), $\"From {Time} repeating every {Interval} until {Until} {Split(TimeZone, \";\").0}\", \n\t\t\t\tAnd(Interval,Not(Until)), $\"From {Time} repeating every {Interval} indefinitely\", \n\t\t\t\tAnd(Days,Weeks,Time,Days.Count==7,Weeks.Count==5), $\"From {Time} repeating daily\", \n\t\t\t\tAnd(Days,Weeks,Time,Days.Count==7,Weeks.Count==1), $\"From {Time} repeating every day for the {GetScheduleWeekofMonth(CoerceLong(Weeks.0))} week only\", \n\t\t\t\tAnd(Days,Weeks,Time,Days.Count==5,Weeks.Count==5), $\"From {Time} repeating every weekday\", \n\t\t\t\tAnd(Days,Weeks,Time,Days.Count==5,Weeks.Count==1), $\"From {Time} repeating every weekday for the {GetScheduleWeekofMonth(CoerceLong(Weeks.0))} week only\", \n\t\t\t\tAnd(Days,Weeks,Time,Days.Count==1,Weeks.Count==5), $\"From {Time} repeating weekly on every {GetScheduleDayofWeek(CoerceLong(Days.0))}\", \n\t\t\t\tAnd(Days,Weeks,Time,Days.Count==1,Weeks.Count==1), $\"From {Time} repeating monthly on every {LowerCase(GetScheduleWeekofMonth(CoerceLong(Weeks.0)))} {GetScheduleDayofWeek(CoerceLong(Days.0))}\", \n\t\t\t\t$\"From {Time} repeating on a custom interval (refer to report definition)\" // unsupported complexity for this version of the report\n\t\t\t)\n\t\t)\n\t)\n)\n"
}
],
"Transformations": [],
"Styles": [],
"Sort": {
"Field": "",
"Direction": "Ascending"
}
}
],
"Count": 1
}
Comments
0 comments
Please sign in to leave a comment.