Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am creating subsites for individual clients. In the subsites I have different lists that capture information for the client. Some of those lists would be repeating (a client might have three properties, for example), meaning that they can add items ("rows"). But other lists really only need to capture one set of information. Now, I guess I could edit the view to disable the "Add item" button, but is there a cleaner way to prevent a user from entering more than one "row" of information into a list?

share|improve this question

5 Answers 5

up vote 5 down vote accepted

There are several way that you could do this. You could use an event receiver to enforce the constraint or you could use a field set to the value of the individual's user name and set it to be unique. You could do this with a workflow if you wanted a "code free" way of doing it. However, they could go back and change the value of this field.

In this case, I would likely use an event receiver as it would have fewer moving parts and could not be easily subverted but could still be disabled by an admin if required at some point.

share|improve this answer

If the client, in your case, is entering in a single-row set of data, it sounds like an opportunity to make use of surveys. Surveys can be configured to allow only one submission and that can further be configured to allow edits in the future, or it can be locked down (if I recall correctly)

share|improve this answer

You could add a person/group column called 'AlreadyCreatedBy'. You could set that column to require unique values. Then, enable content approval on the list. Set up a workflow that copies 'Created By' to 'AlreadyCreatedBy' and if it succeeds then set the approval status of the item to approved.

share|improve this answer
    
So if a list is "approved" then it prevents further entry? Seems like overkill. Is there no other way? –  REMESQ Jun 26 '12 at 16:42
    
The approval process would prevent further items from showing up in the list. The Workflow itself would handle approval. –  James Grizzle Jun 26 '12 at 18:46

Have used this with SharePoint 2010:

  1. Column "Title" changed to calculated value "=Me"
  2. Created next workflow in SharePoint Designer:
    • If Current Item:Title equals Current List:Title
    • Delete item Current Item

Result: New entry will be created and in some seconds removed.

share|improve this answer

something easy to do is to declare a column unique, then set default value to anything and hide the column so it cant be modified by the user.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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