Forums / Setup & design / Fetching list of all distinct attribute values.

Fetching list of all distinct attribute values.

Author Message

Jan Komárek

Saturday 14 February 2009 6:04:49 pm

Hello

I need to fetch list of all distinct attribute values.
I have 3 degree adress district/region/city. District and regions are selectoboxes, but city is text box.
And costomer wants to have a filter with select box with cities, but there will be only cities which was filled in...
So I need to get all values of attribute.

SQL Like:
SELECT DISTINCT city FROM adress;

Thanks for help.

Łukasz Serwatka

Tuesday 17 February 2009 12:24:25 am

Hi,

You can try extended attribute filtering. http://ez.no/doc/ez_publish/technical_manual/4_0/reference/modules/content/fetch_functions/list

You can alternatively write your own fetch function as well.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog