How to limit number of users from adding items to the list? - sharepoint-2010

I have a sharepoint list and i'd like to make it available/accessible only for first 20 users. When the 21st user tries to add an item or edit the list, there should be a error message

Related

Lookup Column Issue - List View Threshold exceeded

We use Sharepoint Foundation 2010 and we have 2 Lists in a site. Those are:
Customers List.
Sale Invoices List.
Customers List has Title field as Unique & Indexed Column.
Sale Invoices List has a lookup column (i.e., Customer) from the Customers List (Title).
My issue is:
Customers List has just crossed 5000 items. When I try to add a List Item in Sale Invoices List (where I have Lookup Column from Customers List), it throws an error as given below:
Error Message:- This is a lookup column that displays data from another list that currently exceeds the List View Threshold defined by the administrator (5000). To add items to the current list, please ask the list owner to remove this column.
I have increased temporarily the List View Threshold Limit to 6000 Items. It’s working fine now.
Is there any solution to fix the issue without increasing the List Items Threshold Limit?
Thanks in Advance.
You should look into archiving list items. Another thing you can think about doing is creating different lists for different time periods so that you can avoid this List View Threshold and your list queries can be as fast as possible.
Check this out: http://referpages.com/wp/2012/04/101/

Sharepoint list item count

I have a list which is having items greater that 5000, now i have a requirement to show the number of items in that list on a web page.Can anybody help me on getting the total items count . The normal list view threshold is set as 5000. I need only the count.
Thanks
You need to get your SP admins to increase the size of a return query to greater than 5000 rows in Central Admin.
If you are using the SP object model in Visual Studio, just loop through the list in increments of the limit until you run out to get the total rows.
There's also a total rows/items property in the SPList object.

SSRS Select All Causes URL to Exceed Max Length

I have about 250 items with IDs about 6-7 characters long. I have them organized into 3 classes with about 8 sub classes in each class. When using the report, users will have the ability to use cascading drop down lists to filter the list of items. However, when the report initially loads, the users want all items to be visible.
The report parameters are being passed via a URL to a web service that will retrieve data for me.
I have set up the items report parameter as a multiselect, but I have manually added the value "All" as the default parameter and have included "All" as a option in the list of resources using the following query:
SELECT 'All' as ItemID
UNION
SELECT itemID as ItemID
FROM (SELECT DISTINCT itemID
FROM itemMaster
WHERE (itemSubClass IN (#itemSubClass)) and itemClass IN (#itemClass))
ORDER BY itemID) as derivedtbl_1
When my program logic detects 'All' as a parameter for items it does not filter any items and sends the full list to the report.
There are a few problems I have with this set up
The 'All' Selection appears buried in my list of items. i.e. (Select All) is first, followed by the numerical items, followed by 'All', followed by alphabetic items.
The (Select All) item still appears in the list because it is a multiselect parameter ad if the user selects it, all 250 items are selected and I receive the max URL characters error.
So, is there an easy way to allow for multiselecting items from that items list (within reason i.e. 10 max which would keep me under the URL error), disabling the (Select All) option, and moving my custom 'All' option to the top of the list in its place?
I think you can get rid of ALL. You need to manipulate the behavior of "SELECT ALL" to behave like ALL i.e. no filters applied in your URL. The way you can do is count the rows in your dataset and compare it with parameter count selection.
Something like:
=iif(Parameters!ItemID.Count=CountRows("ItemIDDataset"),"ALL",JOIN(Parameters!ItemID.Value, ", "))
Make sure when doing count comparison based on if you have removed "ALL" option.
Here are some helpful articles explain this scenario.
http://www.mssqltips.com/sqlservertip/2844/working-with-multiselect-parameters-for-ssrs-reports/
http://dataqueen.unlimitedviz.com/2011/06/how-to-default-to-all-in-an-ssrs-multi-select-parameter/
HTH

MS Access 2007 - Select multiple records and assign a value into a field

I am using a Multiple Items Form to list CASES (records) where there is no TECHNICIAN assigned (Maybe I should use a Datasheet to list the records?).
I would like the user to select a TECHNICIAN from a dropdown field that gets its values from an Employee Table (I can do this). Then I would like the user to select multiple CASES (records) in order to assign that one TECHNICIAN to the Technician field in all of the selected CASES.
Basically, I'm trying to keep the user from having to assign a technician from within each and every incoming case request. I want them to "batch" assign a tech to multiple cases.
Can someone point me in the right direction?
Ok so I did some more research. This may not be the best answer but it works for now.
I created a Multiple Item Form.
I added an unbound dropbox that lists Employees from the table
I added a button on the detail section (for each record) with the follow line of code:
Me.Technician = Me.Choose_Technician
Now the user can pick a technician from the dropdown and then click the button to assign that technician to the record/casefile.
This is a simple solution if you only have a couple of records/casefiles to assign. If the amount of incoming casefiles increases there will have to be a way to select multiple records using the shift key. I'll keep researching this.

SharePoint 2010 CAML Query fails when indexed columns used

I have an SPQuery that has been working fine until my list hit 500 items.
q.Query = "" + DefectID + "";
This was successfully returning 1 item where DefectID matched my provided value.
Once the list hits 500 items, the query returns 0 items, no error message, no exception. If I delete 1 item and take the list down to 499 items, it works again.
The list had individual item permissions, but as part of my debugging I have reset the role inheritance of the list and also every item in the list.
I have tried providing a row limit of 2, and 2000, same result
Have tried Query override throttling, same result. Changed the web app throttle limits to way above my lists number of items, and change the large query window to 24hrs, same result
The column I am querying has an index on it (I am expecting about 30k+ items per year in this list). If I delete the index the query then works when items in the list are > 500. If I create the index again, the query then returns 0
Thanks