1 Reply Latest reply on Jul 28, 2015 3:35 AM by KeithM

    Sequence contains no matching element - when trying to add query to count query gadget in webdesk

    Apprentice

      I hope someone can shed a bit of light onto this for me, I have been copying some of our current queries to allow them to be used with mobile web desk and am getting an error when trying to add some of them onto a count query gadget.

       

      There has been an unexpected error. Click Continue to return to the previous page.

      Sequence contains no matching element

       

      at System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)
        at Touchpaper.Framework.Data.Pm.Rdb.RdbAdapter.FindJoin(IList`1 listBindings, String attributeName, String tableName)
      at Touchpaper.Framework.Data.Pm.Rdb.RdbAdapter.AddChildCondition(IQueryConditionBuilder condition, IList`1 listBindings, StringBuilder buffer, StringBuilder from, IDataParameterCollection parameters, String& prefix)
        at Touchpaper.Framework.Data.Pm.Rdb.RdbAdapter.AddConditions(IEnumerable conditions, StringBuilder buffer, StringBuilder from, IList`1 listBindings, IDataParameterCollection parameters, String prefix, Boolean partOfLocalisedCondition)
        at Touchpaper.Framework.Data.Pm.Rdb.RdbAdapter.BuildWhereClause(StringBuilder buffer, StringBuilder from, IClassType classType, IDataObjectRef objectRef, IDataParameterCollection parameters)
        at Touchpaper.Framework.Data.Pm.Rdb.RdbAdapter.BuildSelectCommand(IDbConnection cnxn, IDataObjectRef objectRef, ISelectStatement selectStmt, Boolean isReadOnly)
        at Touchpaper.Framework.Data.Pm.Rdb.RdbReader.GetCount()
        at Touchpaper.Framework.Data.ConnectedReader.GetCount()
        at Touchpaper.Web.Console.Controllers.DataController.GetQueryCount(IQueryBuilder query)
        at Touchpaper.Web.Console.Controllers.DataController.CreateCountRows(CountTable countTable, QueryParameters parameters)
        at Touchpaper.Web.Console.Controllers.DataController.CreateCountTable(QueryParameters parameters, String id)
      at Touchpaper.Web.Console.Controllers.QueryController.RunQueryToCount(QueryParameters parameters, Boolean saveHistory, String gadgetID)
        at Touchpaper.Web.Console.Controllers.QueryController.RunQueryTo(QueryParameters parameters, Boolean saveHistory, String gadgetID)
        at lambda_method(Closure , ControllerBase , Object[] )
        at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
      at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
        at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<>c__DisplayClass39.b__33()
        at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()
        at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()
        at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()
        at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()
        at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.b__36(IAsyncResult asyncResult)
        at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<>c__DisplayClass2a.b__20()
        at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.b__22(IAsyncResult asyncResult)

       

       

      It seems odd that I am able to add other queries and the originals are all on count queries working fine.  Is this something I'm going to have to raise with support or can anyone see something glaringly obvious that I have done wrong.


      Thanks for any help or advice anyone may have.

      Keith