1

I have a SharePoint list with these fields:

  • Destination - User picks a person
  • Created by - User who created the item

Is there a way to prevent users from creating item for themselves using validation settings?

2 Answers 2

0

By using list validation not column validation. I would need to know more about Destination though. If Destination matches Created by then you can fail and show a message to the user.

Example:

Destination: Smith, John Created by: Smith, John

If(NOT([Destination]=[Created by]), TRUE, FALSE) 

If the condition valuates to true, the new item will be saved. If not it will display the error message.

1
  • good point Ornery Walrus. I didn't think of that. Thanks! Jan 30, 2017 at 15:49
0

Unfortunately there is no way to use either column or list validation to prevent users from creating an item in this way.

This is because the Created By column is not populated until the item is created, and validation occurs before the item is saved. Thus there is nothing to compare the Destination field value against during validation.

In order to prevent users from entering their own name here, you would have to implement some code on the NewForm.aspx page of this list.

Hope this helps!

Your Answer

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

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