Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • stephen 81 posts 122 karma points
    Apr 21, 2022 @ 17:23
    stephen
    0

    GetApprovedRecordsFromPage not in correct order

    I am returning a set of Approved Form Entries and trying to order by descending using the Created Date but for some reason one entry is not displayed correctly in the expected order sequence.

    An example of Created date times are: 21/04/2022 17:21:09, 21/04/2022 14:58:44, 21/04/2022 14:58:31, etc

    but the 1st entry in the above does not appear first. Instead it appears last. All the others are in the correct sequence.

    foreach (var record in recordReaderService.GetApprovedRecordsFromPage(5624, pageNum, 10).Items.ToList<Umbraco.Forms.Core.Interfaces.IRecord>().Where(x => x.State == FormState.Approved).OrderByDescending(x => x.Created))
    

    {......}

Please Sign in or register to post replies

Write your reply to:

Draft