Knowledge Base

How to use [Today] in Calculated Boost Field in a SharePoint list?

By adding a BoostSolutions’ Calculate Boost Field in a SharePoint list, you can create a formula which is used to calculate dates and times, even better, you can use [Today] or [Me] variables in the formula.

For example, there is a list in SharePoint with a number of columns to record and track cases. One of the columns is a calculated boost field - to catch the duration of case processing. We plan to calculate it as a difference between dates and shown in days, if the status is in progress, the duration should be [Today]-[Start Date]; if the status is complete, it should be [End Date]-[Start Date], and if the status is not start, it should be NULL.

In this article, we will demonstrate how to use [Today] in Calculated Boost Field in a SharePoint list.

WHAT YOU'LL GET

When the Status is In Progress, the Duration should be [Today]-[Start Date].

WHAT YOU'LL NEED

The sample data we use for this case

There is a SharePoint list named as Customer’s Case with following columns and items on a SharePoint site.

Use [Today] in Calculated Boost Field in a SharePoint list

  1. Download the trial version of Calculated Boost and install it to your SharePoint server.

  2. Navigate to the Customer’s Case list, click LIST tab. In the Manage Views group, click Create Column.

  3. In the Name and Type section, enter a name in the Column Name field to give it a meaningful name such as Duration, then select Calculated Boost as the type of information in this column.

  4. In the Additional Column Settings section, type this expression in the Formula box.

    If([Status]=="In Progress",DiffDays([Today],[Start Date]), If([Status]=="Complete",DiffDays([End Date],[Start Date]), "NULL"))

    This expression will catch the duration of case processing, if the status is In Progress, the duration should be [Today]-[Start Date]; if the status is Complete, it should be [End Date]-[Start Date], and if the status is Not Start, it should be NULL.

    Specify the data type from this formula as Number and specify the number of decimal places as 0.

    Select the option of Do real-time calculation if formula contains [Today], [Now], [Me], User field, Lookup field etc.

  5. Keep other settings as default and click OK to create column.

  6. Navigate to Customer’s Case list and you will find that a column named as Duration is created in the list as following, and it shows the days of duration based on the status.

Login