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?
|
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. |
|||
|
|
|
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) |
|||
|
|
|
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. |
|||||
|