Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Thomas

ACF add-on | sorting / filtering

Hi,

2 things:

1. I have a repeater field setup and was pretty sure I could sort by this field in the stable version

Can be mistaken but in any case, is it possible?

use case : using repeater field to be able to have multiple values for same attribute, being able to sort using the first value in the ‘repeated fields’ (more over in my case there will often be only one value but I still need the ability to have multiple values)

2. for a regular text field : Sorting by this field makes all the posts without a value set for this field disappear, they reappear if I reset the sorting

see: https://cl.ly/1O2K2H1Q141N/Screen%20Recording%202016-10-28%20at%2010.29%20PM.gif

thanks

thomas

7 years, 5 months ago
Stefan van den Dungen Gronovius
Developer

Hi Thomas,

Thanks for you very much for your feedback.

1) We will have to check this in our latest build and make a fix for this.

2) This is in fact a feature. You can go to the Admin Column Setting page and check if you want to show empty values when sorting. This behavior is the same as in our latest stable version.

7 years, 5 months ago
Thomas

Hi Stefan,

thanks

1 – so without me re-installing the stable version you can confirm I should be able to sort/filter even with repeater fields?

2 – works as expected with the option ticked

7 years, 5 months ago
Stefan van den Dungen Gronovius
Developer

Hi Thomas,

1) We have to check it again because sorting on a repeater field can be heavy on performance. We have to know the value of each record before we can sort. Some sort of caching or index mechanism will help. Filtering is not possible on the current version so we have also have to decide if we’re going to support that.

2) Great it worked!

For your second problem, did you wait at least 1 minute? We cache the filter dropdown for a minute so it won’t be too heavy on performance. Filtering on text field should work so I expect in this case it is a caching problem.

7 years, 5 months ago
Vladislav Vladimirov

Hello, is sorting by repeater field planned for the near future?

2 years, 1 month ago
Stefan van den Dungen Gronovius
Developer

@Vladislav Sorting on the repeater field will not be possible in the future version of our ACF integration. The way this data is stored makes it hard to sort on by SQL.

2 years, 1 month ago
Vladislav Vladimirov

I actually would like to sort by the output of the repeater field as a string. E.g. I am outputting all values of a repeater item (comma separated, or each on a new line), and what I need is for the column to be sortable by that string.

2 years, 1 month ago
Stefan van den Dungen Gronovius
Developer

Unfortunately, that is now how sorting in our plugin works.
For that option, we’ll need to calculate the value of each record, but our plugin sorts directly on the database (SQL). You could create a column of the type ‘Custom Field’ for the first repeater key (every repeater key gets a suffix with its index) and sort on that column.

2 years, 1 month ago

You must be logged in to reply to this topic.