Link to home
Start Free TrialLog in
Avatar of johncheng78
johncheng78

asked on

Limit the number of records in a list

Hi,

I'm using SP2007 List.

I'm wondering if it is possible to limit the number of records added in a list.

1) I like to limit to 50 records and no new records added - is this possible?

2) If above is not possible, how do I develop my workflow using SP designer to check if there is 50 records, and the 51th record can still be added but the status will show 'waiting'
Avatar of nishant joshi
nishant joshi
Flag of India image

you can use sql query in sp such as

select top(50) columnname from table
union
SELECT 'Waiting' as columnname from table

Open in new window


Thanks,
Nishant
ASKER CERTIFIED SOLUTION
Avatar of Jamie McAllister
Jamie McAllister
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of johncheng78
johncheng78

ASKER

JamieMcAllister - your solution interest me.

Can you advise me how does it restrict the number of records?
The column configuration I mention will insist on up to 50 unique values in a given column between the values of 1 and 50. Validation will stop any non-unique columns that do not meet these rules. Therefore by definition it limits the list to 50 rows of data.

The links for auto-incrementing a value mean that the user doesn't have to come up with the unique number themselves.
Which script is that?
I dont see any mention of scripts in my comments. The articles are worth reading.
I've requested that this question be deleted for the following reason:

Not enough information to confirm an answer.
I believe comments ID: 38303750 and ID: 38315140 provide enough information for a solution to the question.