It would be great if one could sort the result.

Comments

progzy created an issue. See original summary.

imclean’s picture

This sounds useful, and could probably be limited to sorting by the following field types:

  1. Webform submission field value (e.g. Last Name, Age, Email etc.)
  2. Other fields in webform_submission_data: webform_id, sid, name (field name), delta

Sorting by submission date, updated date etc. can be done by loading the submissions from the query then sorting the results.

imclean’s picture

Status: Active » Needs review
StatusFileSize
new2.04 KB

Try this. It adds "order by" support for the webform submission field value (point 1 above). Point 2 could probably be done separately if required.

Example:

$query->orderBy('field_name', 'DESC');

"ASC" is used if the direction is omitted.

  • imclean committed 6c33e41 on 8.x-1.x
    Issue #3021783 by imclean: Add sort capability
    
imclean’s picture

Status: Needs review » Fixed

Try the latest dev.

progzy’s picture

Thank you ; I will give it a try when I get more time.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.