Conditional formatting on Sharepoint List for a Boolean field

#Sharepoint

I am creating an onboarding/new hire Sharepoint List at one of my clients and wanted to display a column/field only if a box is checked.

To do this, I created two columns:

I wanted the PreviousUser field to only appear if the ReplacementHire box is checked.

To do this, I opened my Sharepoint List and did the following steps:

  1. Click on the New button on the left side of the page.

  2. In the Form view, click on the book/edit icon at the top right and click “Edit columns”

  1. Click on the three dots next to the column that you want to hide. Click “Edit conditional formula”

  1. In the popup window, paste in the following: =if([$ReplacementHire] == true, 'true', 'false') From what I gather, the if statement reads, if the box is checked (true), then 'true' (meaning display the field), else 'false' (if not, hide the field).

  2. Click OK and then Save. Refresh the page and test.

There was also some headache in the field/column name. What you typed in originally for the column name will be the “anchor” or name in the URL.

To get this anchor, do the following:

  1. Navigate to the Sharepoint site, click on Site Contents.

  2. Find the form, click on the three dots, and click Settings.

  3. On the Settings page, click on the column title under the Columns section.

  4. On the Column setting page, check the URL in your browser for anything after &Field= This info will be the “anchor” that you use for the =if([$anchor] == true, 'true', 'false') in the Conditional Format window.

Just putting this here for my future reference.

Discuss...