1

I am trying to use list validation to enforce that the value in the Category choice column is compatible with a value in the Activity choice column (1:1)

If [Activity] = "Walking"; [Category] = "Exercise"

i.e. any choice in Activity that is not Walking is not equal to Exercise.

I'd have thought this easy, but not for me.

3
  • What exactly you want to achieve? You want to force user to select "Exercise" in Category when user selects "Walking" in Activity OR something else? Oct 14, 2021 at 8:23
  • If Walking has been chosen in Activity, only Exercise can be chosen in Category
    – cdfj
    Oct 14, 2021 at 8:28
  • Sorry, should have added no OR needed
    – cdfj
    Oct 14, 2021 at 8:35

1 Answer 1

0

Try using list validation formula like below:

If([Activity] = "Walking", If([Category] = "Exercise", true, false), true)

You have to add this formula under List Validation settings.

Follow below steps:

  1. Go to SharePoint list
  2. Click on Settings icon and select List settings
  3. Select Validation settings
  4. Add formula & user message and click Save

Similar thread: Validation Column Not Working


Note:

  1. Sometimes comma(,) does not work in formula (I am not sure but it is based on something language or regional settings on your site). So in that case use semicolon(;) instead of comma(,).
1
  • 1
    Many thanks Ganesh - greatly appreciated!
    – cdfj
    Oct 14, 2021 at 9:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.