Monday, September 17, 2018

Create an Event Saved Search that Shows the Number of Business Weekdays in a Date Range

To create the search, perform the following steps:

     1. Navigate to Lists > Search > Saved Searches > New.
     2. Select Event.
     3. Provide a Search Title.
     4. In the Criteria tab > Standard subtab, set the required filters.
     5. In the Results tab > Columns subtab, add Formula (Numeric) field.
     6. In the Function field, select Round.
     7. In the Formula field, use the formula below:

 trunc(({startdate}-trunc({today}))/7)*5 + mod({startdate}-trunc({today}),7) - CASE WHEN to_number(to_char({startdate},'D')) < to_number(to_char({today},'D')) THEN 2 ELSE 0 END

      8. Click Save and Run.

Note: This currently serves as an alternate solution for Enhancement Request #139186.

No comments:

Post a Comment