Search

How to fetch DISTINCT/UNIQUE records from the particular symphony section using datasource.

example:-

current output:

sam
raj
sam
raj
praveen
sam

required output:

sam
raj
praveen

Regular datasources don't support that kind of functionality. Instead you could leverage XSLT to filter out duplicate entries:

<xsl:apply-templates select="entry[preceding-sibling::entry/unique-value != current()/unique-value]" />

You could use the Group functionality of a data source, which will group by distinct values of your text field.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details