Skip to main content
added 14 characters in body
Source Link
dsara
  • 246
  • 3
  • 9

I understand this was answered over two years ago but I found a better fix for this other than increasing the List View Lookup Threshold.

As recommended here:

http://blogs.msdn.com/b/spses/archive/2013/12/02/sharepoint-2010-2013-list-view-lookup-threshold-uncovered.aspxhere.

You should not increase the list threshold above 8/12 if you can help it due to the performance issues that can occur.

Stumbling around the internet I found three articles offering solutions to this problem that didn't require a threshold change:

http://ehikioya.com/lookup-column-error/

http://joshihemant.wordpress.com/2012/05/29/error-value-does-not-fall-within-the-expected-range/

http://ranaictiu-technicalblog.blogspot.com/2010/12/sharepoint-2010-error-list-view-lookup.html

So if you change your code to look something like below the error should go away without requiring an increase in the List View Lookup Threshold.

foreach (SPListItem itemLookup in listItems)
{
    SPListItem item = listItems.GetItemById(itemLookup.ID);
    SPListItem targetItem = destinationList.Items.Add();
    foreach (SPField field in item.Fields)
    {
        if (!field.ReadOnlyField && field.InternalName != "Attachments")
        {
            if (item[field.InternalName] != null)
            {

I understand this was answered over two years ago but I found a better fix for this other than increasing the List View Lookup Threshold.

As recommended here:

http://blogs.msdn.com/b/spses/archive/2013/12/02/sharepoint-2010-2013-list-view-lookup-threshold-uncovered.aspx

You should not increase the list threshold above 8/12 if you can help it due to the performance issues that can occur.

Stumbling around the internet I found three articles offering solutions to this problem that didn't require a threshold change:

http://ehikioya.com/lookup-column-error/

http://joshihemant.wordpress.com/2012/05/29/error-value-does-not-fall-within-the-expected-range/

http://ranaictiu-technicalblog.blogspot.com/2010/12/sharepoint-2010-error-list-view-lookup.html

So if you change your code to look something like below the error should go away without requiring an increase in the List View Lookup Threshold.

foreach (SPListItem itemLookup in listItems)
{
    SPListItem item = listItems.GetItemById(itemLookup.ID);
    SPListItem targetItem = destinationList.Items.Add();
    foreach (SPField field in item.Fields)
    {
        if (!field.ReadOnlyField && field.InternalName != "Attachments")
        {
            if (item[field.InternalName] != null)
            {

I understand this was answered over two years ago but I found a better fix for this other than increasing the List View Lookup Threshold.

As recommended here.

You should not increase the list threshold above 8/12 if you can help it due to the performance issues that can occur.

Stumbling around the internet I found three articles offering solutions to this problem that didn't require a threshold change:

http://ehikioya.com/lookup-column-error/

http://joshihemant.wordpress.com/2012/05/29/error-value-does-not-fall-within-the-expected-range/

http://ranaictiu-technicalblog.blogspot.com/2010/12/sharepoint-2010-error-list-view-lookup.html

So if you change your code to look something like below the error should go away without requiring an increase in the List View Lookup Threshold.

foreach (SPListItem itemLookup in listItems)
{
    SPListItem item = listItems.GetItemById(itemLookup.ID);
    SPListItem targetItem = destinationList.Items.Add();
    foreach (SPField field in item.Fields)
    {
        if (!field.ReadOnlyField && field.InternalName != "Attachments")
        {
            if (item[field.InternalName] != null)
            {
added 6 characters in body
Source Link
dsara
  • 246
  • 3
  • 9

I understand this was answered over two years ago but I found a better fix for this other than increasing the List View Lookup Threshold.

As recommended here:

http://blogs.msdn.com/b/spses/archive/2013/12/02/sharepoint-2010-2013-list-view-lookup-threshold-uncovered.aspx

You should not increase the list threshold above 8/12 if you can help it due to the performance issues that can occur.

Stumbling around the internet I found three articles offering solutions to this problem that didn't require a threshold change:

http://ehikioya.com/lookup-column-error/

http://joshihemant.wordpress.com/2012/05/29/error-value-does-not-fall-within-the-expected-range/

http://ranaictiu-technicalblog.blogspot.com/2010/12/sharepoint-2010-error-list-view-lookup.html

So if you change your code to look something like below the error should go away without requiring an increase in the List View Lookup Threshold.

foreach (SPListItem itemLookup in listItems)
{
    SPListItem item = listItems.GetItemById(itemLookup.ID);
    SPListItem targetItem = destinationList.Items.Add();
    foreach (SPField field in item.Fields)
    {
        if (!field.ReadOnlyField && field.InternalName != "Attachments")
        {
            if (item[field.InternalName] != null)
            {

I understand this was answered over two years ago but I found a better fix for this than increasing the List View Lookup Threshold.

As recommended here:

http://blogs.msdn.com/b/spses/archive/2013/12/02/sharepoint-2010-2013-list-view-lookup-threshold-uncovered.aspx

You should not increase the list threshold above 8/12 if you can help it due to the performance issues that can occur.

Stumbling around the internet I found three articles offering solutions to this problem that didn't require a threshold change:

http://ehikioya.com/lookup-column-error/

http://joshihemant.wordpress.com/2012/05/29/error-value-does-not-fall-within-the-expected-range/

http://ranaictiu-technicalblog.blogspot.com/2010/12/sharepoint-2010-error-list-view-lookup.html

So if you change your code to look something like below the error should go away without requiring an increase in the List View Lookup Threshold.

foreach (SPListItem itemLookup in listItems)
{
    SPListItem item = listItems.GetItemById(itemLookup.ID);
    SPListItem targetItem = destinationList.Items.Add();
    foreach (SPField field in item.Fields)
    {
        if (!field.ReadOnlyField && field.InternalName != "Attachments")
        {
            if (item[field.InternalName] != null)
            {

I understand this was answered over two years ago but I found a better fix for this other than increasing the List View Lookup Threshold.

As recommended here:

http://blogs.msdn.com/b/spses/archive/2013/12/02/sharepoint-2010-2013-list-view-lookup-threshold-uncovered.aspx

You should not increase the list threshold above 8/12 if you can help it due to the performance issues that can occur.

Stumbling around the internet I found three articles offering solutions to this problem that didn't require a threshold change:

http://ehikioya.com/lookup-column-error/

http://joshihemant.wordpress.com/2012/05/29/error-value-does-not-fall-within-the-expected-range/

http://ranaictiu-technicalblog.blogspot.com/2010/12/sharepoint-2010-error-list-view-lookup.html

So if you change your code to look something like below the error should go away without requiring an increase in the List View Lookup Threshold.

foreach (SPListItem itemLookup in listItems)
{
    SPListItem item = listItems.GetItemById(itemLookup.ID);
    SPListItem targetItem = destinationList.Items.Add();
    foreach (SPField field in item.Fields)
    {
        if (!field.ReadOnlyField && field.InternalName != "Attachments")
        {
            if (item[field.InternalName] != null)
            {
added 4 characters in body
Source Link
dsara
  • 246
  • 3
  • 9

I understand this was answered over two years ago but I found a better fix for this than increasing the List View Lookup Threshold.

As recommended here:

http://blogs.msdn.com/b/spses/archive/2013/12/02/sharepoint-2010-2013-list-view-lookup-threshold-uncovered.aspx

You should not increase the list threshold above 8/12 if you can help it due to the performance issues that can occur.

Stumbling around the internet I found three articles offering solutions to this problem that didn't require a threshold change:

http://ehikioya.com/lookup-column-error/   

http://joshihemant.wordpress.com/2012/05/29/error-value-does-not-fall-within-the-expected-range/   

http://ranaictiu-technicalblog.blogspot.com/2010/12/sharepoint-2010-error-list-view-lookup.html

So if you change your code to look something like below the error should go away without requiring an increase in the List View Lookup Threshold.

foreach (SPListItem itemLookup in listItems)
{
    SPListItem item = listItems.GetItemById(itemLookup.ID);
    SPListItem targetItem = destinationList.Items.Add();
    foreach (SPField field in item.Fields)
    {
        if (!field.ReadOnlyField && field.InternalName != "Attachments")
        {
            if (item[field.InternalName] != null)
            {

I understand this was answered over two years ago but I found a better fix for this than increasing the List View Lookup Threshold.

As recommended here:

http://blogs.msdn.com/b/spses/archive/2013/12/02/sharepoint-2010-2013-list-view-lookup-threshold-uncovered.aspx

You should not increase the list threshold above 8/12 if you can help it due to the performance issues that can occur.

Stumbling around the internet I found three articles offering solutions to this problem that didn't require a threshold change:

http://ehikioya.com/lookup-column-error/  http://joshihemant.wordpress.com/2012/05/29/error-value-does-not-fall-within-the-expected-range/  http://ranaictiu-technicalblog.blogspot.com/2010/12/sharepoint-2010-error-list-view-lookup.html

So if you change your code to look something like below the error should go away without requiring an increase in the List View Lookup Threshold.

foreach (SPListItem itemLookup in listItems)
{
    SPListItem item = listItems.GetItemById(itemLookup.ID);
    SPListItem targetItem = destinationList.Items.Add();
    foreach (SPField field in item.Fields)
    {
        if (!field.ReadOnlyField && field.InternalName != "Attachments")
        {
            if (item[field.InternalName] != null)
            {

I understand this was answered over two years ago but I found a better fix for this than increasing the List View Lookup Threshold.

As recommended here:

http://blogs.msdn.com/b/spses/archive/2013/12/02/sharepoint-2010-2013-list-view-lookup-threshold-uncovered.aspx

You should not increase the list threshold above 8/12 if you can help it due to the performance issues that can occur.

Stumbling around the internet I found three articles offering solutions to this problem that didn't require a threshold change:

http://ehikioya.com/lookup-column-error/ 

http://joshihemant.wordpress.com/2012/05/29/error-value-does-not-fall-within-the-expected-range/ 

http://ranaictiu-technicalblog.blogspot.com/2010/12/sharepoint-2010-error-list-view-lookup.html

So if you change your code to look something like below the error should go away without requiring an increase in the List View Lookup Threshold.

foreach (SPListItem itemLookup in listItems)
{
    SPListItem item = listItems.GetItemById(itemLookup.ID);
    SPListItem targetItem = destinationList.Items.Add();
    foreach (SPField field in item.Fields)
    {
        if (!field.ReadOnlyField && field.InternalName != "Attachments")
        {
            if (item[field.InternalName] != null)
            {
Source Link
dsara
  • 246
  • 3
  • 9
Loading