SharePoint list edit column formula

2 min to read

Show or Hide column based on condition in SharePoint Online list.

Show or Hide column based on condition in SharePoint Online list

Microsoft announced an updated feature that is shown or hide the column in the SharePoint list based on a value in another column by specifying the conditional formulas, this formula is made with equations. In this blog, we can see how to create this conditional equation and the outcomes of this equation.

How to create a conditional formula?

  1. Go to SharePoint list select the column which you want to set a conditional formula
  2. Select More options select Edit Edit form Edit columns.

  1. specify the conditional formula based on other columns and click save.

Conditional formulas:

Now lets consider the equation to perform the actions. The equation must start with = and followed with if condition, if the condition satisfies then it returns true this means it shows the column, else it returns false which makes the column to hide.

For example:

In our example, we are applying the formula in the column workpercentage. if the status value is completed then workpercentage need to be true, which means workpercentage needs to show up.
=if[[$status]==completed,true, false]

Or else the workpercentage column will get hidden while editing.

Choice column:

This equation checks the choice column status is equal to completed
=if[[$status]==completed,true, false]

Number column:

This following formula check the number column workpercentage is less than or equal to 50
=if[[$workpercentage]500, true,false]

Date column:

We can act with a date column[M/D/Y]
=if[[$StartDate]==Date[5/21/2020],true,false]
This data column can also play with operators [less than or equal to]
=if[[$StartDate] >= Date[4/6/2020],true,false] And we can also apply the condition for both start and enddate with the equation.
=if[[$StartDate] >= Date[4/6/2020] && [$EndDate]

Chủ Đề