Items Function evaluation timed out.

tedatadcu
tedatadcu used Ask the Experts™
on
Hello!

I faced a problem when I try to view the ResultsView of " _result " I can't get the result it showed me this error msg " Items Function evaluation timed out. "


var _result =
               from AS_EN in adminStatus_Enalbled
               join AS_DI in adminStatus_Disabled on AS_EN.adminStatus_Enalbled_popID equals AS_DI.adminStatus_Disabled_popID
               into p
               from s in p.DefaultIfEmpty()
               select new {
                   ExchangeMatrixID = AS_EN.adminStatus_Enalbled_popID,
                   AS_En_Count = (AS_EN != null) ? AS_EN.adminStatus_Enalbled_Count : 0,
                   AS_Di_Count = (s != null) ? s.adminStatus_Disabled_Count : 0,


                   OP_UP_Count = (
                     from OP_UP_Count in OperationalStatus_Up
                     where OP_UP_Count.OperationalStatus_Up_popID.Equals(AS_EN.adminStatus_Enalbled_popID)
                     select OP_UP_Count.OperationalStatus_Up_Count).FirstOrDefault(),

               };

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
ǩa̹̼͍̓̂ͪͤͭ̓u͈̳̟͕̬ͩ͂̌͌̾̀ͪf̭̤͉̅̋͛͂̓͛̈m̩̘̱̃e͙̳͊̑̂ͦ̌ͯ̚d͋̋ͧ̑ͯ͛̉Glanced up at my screen and thought I had coded the Matrix...  Turns out, I just fell asleep on the keyboard.
Most Valuable Expert 2011
Top Expert 2015

Commented:
I faced a problem when I try to view the ResultsView of " _result "
Do you mean you get the problem when trying to view the result in the debugger, or do you get the error during runtime?

Author

Commented:
yes, I get the problem when trying to view the result in the debugger !!?
ǩa̹̼͍̓̂ͪͤͭ̓u͈̳̟͕̬ͩ͂̌͌̾̀ͪf̭̤͉̅̋͛͂̓͛̈m̩̘̱̃e͙̳͊̑̂ͦ̌ͯ̚d͋̋ͧ̑ͯ͛̉Glanced up at my screen and thought I had coded the Matrix...  Turns out, I just fell asleep on the keyboard.
Most Valuable Expert 2011
Top Expert 2015

Commented:
From what I read, this is a flaw (or feature) of the debugger. The solutions point to creating a function to inspect the value of the result. However, let's try a tweak on that. Try the following. I've included the "#if DEBUG" so that the code will only be compiled when you are in a DEBUG configuration. Also, the debugger should break on the subsequent line, and you should be able to inspect the resulting list.

var _result =
               from AS_EN in adminStatus_Enalbled
               join AS_DI in adminStatus_Disabled on AS_EN.adminStatus_Enalbled_popID equals AS_DI.adminStatus_Disabled_popID
               into p
               from s in p.DefaultIfEmpty()
               select new {
                   ExchangeMatrixID = AS_EN.adminStatus_Enalbled_popID,
                   AS_En_Count = (AS_EN != null) ? AS_EN.adminStatus_Enalbled_Count : 0,
                   AS_Di_Count = (s != null) ? s.adminStatus_Disabled_Count : 0,


                   OP_UP_Count = (
                     from OP_UP_Count in OperationalStatus_Up
                     where OP_UP_Count.OperationalStatus_Up_popID.Equals(AS_EN.adminStatus_Enalbled_popID)
                     select OP_UP_Count.OperationalStatus_Up_Count).FirstOrDefault(),

               };

#if DEBUG

var _resultList = _result.ToList();
System.Diagnostics.Debugger.Break();

#endif

Open in new window

Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

Author

Commented:
Dear kaufmed,

       I already can get the result view but it doesn't appear and I get this error msg "  Items Function evaluation timed out "
Glanced up at my screen and thought I had coded the Matrix...  Turns out, I just fell asleep on the keyboard.
Most Valuable Expert 2011
Top Expert 2015
Commented:
I already can get the result view but it doesn't appear and I get this error msg
I think you misinterpreted what I was having you do above.

In the above, when you call ToList() on the Linq result, you are actually executing the query--just declaring the query does not actually run it, which is why you see text referring to "function timed out". Try the above code and when the debugger breaks at the call to Break(), mouse over "_resultList" and see if you can see results.

Author

Commented:
Thanks alot really thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial