Monday, October 15, 2018

Previous Rolling Month Date Range on Saved Search Using a Formula


1. Navigate to Lists > Search > Saved Searches > New
2. Click Case.
3. Click Criteria tab.
4. Click Standard sub tab.
5. Select Formula (Numeric) under the Filter column.
6. Enter the formula below on the Formula field:
CASE WHEN {createddate} BETWEEN ((ADD_MONTHS({today},-1))-1) AND {today} THEN 1 ELSE 0 END
7. Set the Formula (Numeric) to equal to.
8. Set Value to 1.
9. Click Set.
10. Add Stage is any of Open, Escalated.
11. Click on the Results tab.
12. Click Columns sub tab.
13. Click Remove All button
14. Click on Field column to add Assigned To.
15. Click on the next line to add Number.
16. Click on the next line to add Date Created.
17. Click on the next line to add Last Modified.
18. Click on the next line to add Formula (Text).
19. Enter the formula below under Formula column:
(SUBSTR(({today}-{createddate}), 0, ((INSTR(({today}-{createddate}), '.', 1))-1))) || ' ' || 'days' || ' ' || (ROUND((({today}-{createddate}) - TO_NUMBER(SUBSTR(({today}-{createddate}), 0, ((INSTR(({today}-{createddate}), '.', 1))-1))))*24)) || ' ' || 'hrs.'
20.Type in Time under Custom Label column.
21. Click on the next line to add Stage.
22. Click on the next line to add Company.
23. Set the Sort By field to Assigned To.
24. Preview.

Result: If today = July 17, 2011, the saved search result should show all open cases created from June 16, 2011 to July 17, 2011.


Note:
The result should also have columns similar to Open Case Analysis Detail report (Reports > Customer Service > Open Case Analysis > Detail).

 

No comments:

Post a Comment