Monday, October 15, 2018

Last Rolling Week 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 ({today}-7) AND ({today}-1) 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 July 10, 2011 to July 16, 2011.


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

 

1 comment:

  1. I'm interesting doing the same with Scheduled Date > Today but hit error. The Scheduled Date is in dd-MON-yyyy format. How do I convert Today's format same as Scheduled Date?

    ReplyDelete