I am not sure how to order the entries based on record field values.
This is my code
var allEntries = Library.GetRecordsFromForm(formGUID);
var entries1 = allEntries.Items.Where(i => (i.RecordFields.Values.Any(f => f.ValuesAsString().Contains(str)))).ToList();
I am able to filter the values based on RecordFieldValues but cannot order them.
I have tried var entries1 = allEntries.Items.Where(i => (i.RecordFields.Values.Any(f => f.ValuesAsString().Contains(str)))).OrderByDescending(g=>g.RecordFields.Values.Where(d=>d.Field.Caption=="#Test")).ToList();
Comes up with an error Exception: System.ArgumentException: At least one object must implement IComparable
RecordsFromForm - Order by field values
I am not sure how to order the entries based on record field values. This is my code
var allEntries = Library.GetRecordsFromForm(formGUID); var entries1 = allEntries.Items.Where(i => (i.RecordFields.Values.Any(f => f.ValuesAsString().Contains(str)))).ToList();
I am able to filter the values based on RecordFieldValues but cannot order them.
I have tried var entries1 = allEntries.Items.Where(i => (i.RecordFields.Values.Any(f => f.ValuesAsString().Contains(str)))).OrderByDescending(g=>g.RecordFields.Values.Where(d=>d.Field.Caption=="#Test")).ToList();
Comes up with an error Exception: System.ArgumentException: At least one object must implement IComparable
is working on a reply...