I am trying to sort some objects by a nesten field, but cannot seem to get it working. I would like to sort all the results, (each containing the EnumerableField) based on the first element matching the z-lambda function of all the elements.
This is the nested sorting function I am using, which produces a "EPiServer.Find.ServiceException: 'The remote server returned an error: (400) Bad Request".
:
search.OrderBy(x => x.EnumerableField,
y => y.DecimalNumber,
z => z.ValidTo.After(DateTime.Now) & z.IsActive.Match(true) & z.ValidFrom.Before(DateTime.Now));
I have also tested sorting with .FirstOrDefault(...) but to no avail. As opposed to the previous approach, this one does not seem to do anything:
Hi,
I am trying to sort some objects by a nesten field, but cannot seem to get it working. I would like to sort all the results, (each containing the EnumerableField) based on the first element matching the z-lambda function of all the elements.
This is the nested sorting function I am using, which produces a "EPiServer.Find.ServiceException: 'The remote server returned an error: (400) Bad Request".
:
I have also tested sorting with .FirstOrDefault(...) but to no avail. As opposed to the previous approach, this one does not seem to do anything:
Is there something I am missing, or is this not possible?
The find-index objects is grouped in this way: