1

I'm trying to come up with a formula that could validate a column.

I have a form in SharePoint to register parcel shipments. There's a column that contains a shipment code (values 1, 2, 3).

If the value in the column [shipment code] = 1, the column [Country name] must contain a country name (can't be blank).

If the value in the column [shipment code] is 2 or 3, the column [Country name] must be kept empty.

1 Answer 1

0

Try using SharePoint list validation settings for this requirement.

Assuming [shipment code] is choice field and has only 3 choices (1,2 and 3). Try something like below formula:

=IF([shipment code]=1,IF(ISBLANK([Country name]),false,true),IF(ISBLANK([Country name]),true,false))

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(,).

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.