If statement in formula indicator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2019 02:50 AM
I would like advice on how to write a formula indicator with an if statement.
The scenario is
If today is Monday, True would be sum incidents opened Friday, Saturday and Sunday / incidents opened on Thursday, False = sum of incidents opened yesterday / sum of incidents opened the day before yesterday.
I do not have the access to write scripts.
- Labels:
-
Dashboard
-
Performance Analytics
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2019 03:40 AM
Hi,
go through this link,may helpful to you,
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2019 07:39 AM
Here is a reference on using JavaScript in formulas:
https://community.servicenow.com/community?id=community_blog&sys_id=1f0d2ea5dbd0dbc01dcaf3231f961947
Only counting weekdays is challenging trying to look back in time. I'm not sure how you would do it prior to Madrid, but in Madrid (with the addition of PAFormulaUtils, this is doable (but it will take some interesting JavaScript in the formula to get the day of the week). Also, if you are a global company, remember to account for timezones.