show / hide menu

System.ArgumentException: Value does not fall within the expected range.

System.ArgumentException: Value does not fall within the expected range.

Exception Details

System.ArgumentException: Value does not fall within the expected range.

at Microsoft.SharePoint.SPFieldMap.GetColumnNumber(String strFieldName, Boolean bThrow)
at Microsoft.SharePoint.SPListItemCollection.GetColumnNumber(String groupName, Boolean bThrowException)
at Microsoft.SharePoint.SPListItemCollection.GetRawValue(String field name, Int32 iIndex, Boolean bThrow)
at Microsoft.SharePoint.SPListItem.GetValue(SPField fld, Int32 columnNumber, Boolean bRaw, Boolean bThrowException)
at Microsoft.SharePoint.SPListItem.GetValue(String strName, Boolean bThrowException)
at Microsoft.SharePoint.SPListItem.get_Item(String fieldName)

Solution

1. Increase list view look up threshold

2. SharePoint implements meta data columns as Lookup Lists behind the scenes. If you use Share point Manager or some other tool you will notice there is a hidden list at the Site Collection Level “TaxonomyHiddenList”. Every hour the “Taxonomy Update Scheduler” Timer Job is responsible for syncing this list with Central Term Store Management. This is really the list your columns are syncing with.

3. SharePoint 2010 introduced the concept of Resource Throttling at the Web Application level. There is a limit placed on the number of lookup lists that can be included in a query. And this setting is different for Administrators and Regular Users.

To find the setting go to Central Admin -> Application Management->Manage Web Applications. Select General Settings->Resource Throttling. The default values are as follows. I increased our List View Lookup Threshold to 18 to accommodate our queries: