1

In my SharePoint list there are two columns: A and B (both of them are required).

Scenario: If user will input value in column A, he don't need fill column B.

And reverse, if the user enters the value of B column in column A - he don't need to enter value.

The requirement is important, but how to control it?

1
  • If users adds value in column A, do you want to restrict users from entering value in column B? or it's up to user to keep it empty or add value in column B as well? Apr 13 at 11:00
1

Follow below steps:

  1. Set Require that this column contains information to No for both columns from column settings
  2. Go to List settings
  3. Click Validation settings
  4. Enter either of below formula (as per your requirement) in Formula text box
  5. Add meaningful error message in User Message text box. This message will be shown to users on list forms
  6. Click Save

If you want to restrict user from entering value in 2nd column if 1st column has value, use:

=IF(ISBLANK([A]), IF(ISBLANK([B]), FALSE, TRUE), IF(ISBLANK([B]), TRUE, FALSE))

OR simply use:

=IF(ISBLANK([A]), IF(ISBLANK([B]), FALSE, TRUE), TRUE)

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(,).
3
  • I try to use your fomula but sharepoint give me syntax error.
    – Jacko21
    Apr 13 at 22:18
  • Try replacing , in formula by ; and then use it. Check "Note" in my updated answer. Apr 14 at 3:35
  • Yes, replacing by ; helps.
    – Jacko21
    Apr 16 at 6:56
0

You don’t need to set column as required. Please use below formula in the list validation.

IF([A]="",IF([B]<>"",TRUE,FALSE),IF([A]<>"",IF([B]="",TRUE,FALSE),TRUE))

2
  • I try to use your fomula but sharepoint give me syntax error.
    – Jacko21
    Apr 13 at 22:18
  • You should replace "A" and "B" with your two column names. Apr 14 at 9:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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