CON-878 - GetApprovedRecordsFromForm does not contain a definition for OrderBy

Created by Dennis Aaen 21 Jan 2016, 09:41:29 Updated by Lukas Vorlicek 10 Aug 2018, 01:05:11

Relates to: CON-1366

If you are using the GetApprovedRecordsFromForm then you can't order your resultats. https://our.umbraco.org/documentation/Add-ons/UmbracoForms/Developer/Working-With-Data/

For example see here: https://our.umbraco.org/forum/developers/api-questions/74448-dynamicrecordlist-orderby-error

Comments

Chris Foot 18 Jul 2017, 09:12:46

This is still an issue in 6.0.2. It is compounded by the fact that the fields are brought back in a seemingly random order rather than the order they are set to in the backoffice


Lukas Vorlicek 10 Aug 2018, 01:05:11

Not working in 6.0.8:

Library.GetRecordsFromForm("7ad9fb6f-2c31-420b-b0e3-749d5b8d273b").OrderBy("Created"); Library.GetApprovedRecordsFromPage(2301).OrderBy("Created");

but the example from the docs IS working properly:

Library.GetApprovedRecordsFromPage(@CurrentPage.Id).OrderBy("Created");

really weird


Priority: Normal

Type: Bug

State: Submitted

Assignee:

Difficulty:

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 4.1.4, 4.3.3, 6.0.2, 6.0.8

Due in version:

Sprint:

Story Points:

Cycle: