How should the validation formula contain the following conditions:

IF((X1<>empty AND X<>X2) OR (Y1<>empty  AND Y<>Y2))

I need avoid that 2 collumns (X & Y) be edited more than once. When the X and Y columns are filled the columns X1 and Y1 are populated with any value through a workflow. When this happens the columns X2 and Y2 are filled with values that are in X and Y in this same workflow respectively. I need to know how to build this formula to add in the list validation settings and show a message for user.

1 Answer 1


You could just build logic into your workflow to check if X2 or Y2 has a value. If they do, then X or I had previously had values and you simply check if the current value of X or Y still equal that of X2 or Y2. If they don't, it's a second edit and you simply overwrite the values of X or Y with that of X2 or Y2.

Alternatively, you could customize the edit form with InfoPath and then do some logic checking on the X and Y fields. If they contain data, you simply set their controls to read only.

Field validation logic, using the SharePoint validation system would look like this:

  • I already did it that way and it worked, but that way the user tries to edit X and Y for the second time and saves the item. And in the view the new values that it edited appear, only when the page refreshes (workflow finished) does the old value appear. I need to prevent the item from being saved when (X1 <> empty AND X <> X2) OR (Y1 <> empty AND Y <> Y2) and show a message saying that the values can no longer be changed. I need to know the correct syntax of the above formula.
    – Jean Leles
    Mar 17, 2017 at 2:32
  • Is the form a custom or out of the box list edit form? Mar 17, 2017 at 2:38
  • See my amendment to the answer relating to InfoPath. Mar 17, 2017 at 2:40
  • No! I use the default form of list. I want to use the default validation of list as this example info.summit7systems.com/blog/…
    – Jean Leles
    Mar 17, 2017 at 11:38
  • Ok, I understand. I've added the logic formula to my answer. Mar 17, 2017 at 14:36

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.