Support

Search results for ""

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

Unable to filter by field of user_ids which are displaying as type User

I have a custom field which holds an array of user_ids. I am able to transform them to user Full Names with a link to their profile by setting the field type to User.

Unfortunately, I am unable to sort by the transformed field, because the array is serialised. Even the smart filter won’t allow me to use a condition of is not, and is not set does not work for a:0:{}.

Any advice on how to be able to sort. Ultimately I am trying to create a Column Set that just shows products with items in the array in the custom field.

1 year, 3 months ago
Stefan van den Dungen Gronovius
Developer

As you said, the values are stored serialized in the database, so there is no way to sort the results on the table based on an SQL query. It would be way too heavy on performance to retrieve the values in PHP and sort with PHP on large datasets, so we did not choose that solution for our product. Unfortunately, I don’t see a workaround to make this work for your use case.

1 year, 3 months ago
Darcy

I understand this, but I still find it strange that you only provide to filter by is, but not is not. As I said, I can at least exclude empty ones is there is an option to filter by is not

1 year, 3 months ago

You must be logged in to reply to this topic.