Skip to main content

Require Detail for ‘Other’

This list validation uses a SharePoint formula to require a detail field to be filled in when the category is Other. Applied as list validation, it compares the columns when the item is saved and blocks the entry if the rule is not met.
Built with
Features
Choice Column, List Validation, Single Line of Text Column
Category
Formulas

Want one like this?

Talk to Greg
  • What it does: When Category is Other, requires the Details field to be filled in before the item can save.
  • If it passes: Either Category is not Other, or it is and Details has text, so the item saves.
  • If it fails: If Category is Other and Details is empty, the save is blocked and your message appears, for example: Please add details when Category is Other.
  • Forcing an explanation for Other
  • Complete categorization
  • Better data capture
  • Conditional required fields
  • Formula Type: List Validation
  • Formula Category: Text & Names
Display nameColumn type
CategoryChoice
DetailsSingle line of text
  1. Create the columns the formula reads: Category and Details
  2. Add or edit a few items so there is data for the formula to work with
  1. Go to List settings (or Library settings), then Validation settings
  2. Paste the formula below, which compares the columns
  3. Add a user message explaining the rule
  4. Save. New or edited items must satisfy the rule
=IF([Category]="Other",LEN([Details])>0,TRUE)
What does this formula do?

Conditional mandatory field. It runs as list validation, comparing the columns when the item is saved.

Which columns do I need to set this up?

You need: Category (Choice), Details (Single line of text). The formula reads these to produce its result.

Why use list validation instead of column validation?

List (or library) validation can compare several columns to each other in the same item, which column validation cannot do.

If LookBook 365 is code-free and out-of-the-box, why does this example use a formula?

A SharePoint formula is native, declarative configuration, not custom development. It only works with the item’s own fields and simple logic – it cannot run scripts, reach external services, or change other data, and nothing is deployed to your tenant. It keeps working through Microsoft updates. If you would rather not set this up yourself, this is exactly the kind of thing I configure for clients.

Require Detail for 'Other' Formula Example
Require Detail for 'Other' Formula Example