Search

Hi, Guruz, didn't find the answer on the forum :-( Of course i can use xslt to filter out section fields with empty value, but filtering ds seems to be more elegant way.

What field are you filtering on? In the latest version (2.2+) some Symphony fields support this "negation" logic.

For a Select Box Link you can use:

  • sql: NULL for entries that have no related entry
  • sql: NOT NULL for entries that have a related entry
  • not:foo to match values that do not equal foo

Text Input fields support regular expression filtering, which maps directly onto the MySQL REGEXP function. So you can use:

  • regexp:[a-zA-Z] for values that begin with a letter A-Z (upper or lower case)
  • not-regexp:[0-9] for values that do not begin with a number

So if you only wanted entries that do not have a value for the field at all, you could assume that the data value will always be alphanumeric (a-z, A-Z, 0-9) if it is set, and use not-regexp:

 not-regexp:[a-zA-Z0-9]

I haven't tested it, but I think that should work.

regexp:^.+$

This worked for me. Thanks for the reply, Nick

Or that :-)

For some reason empty values in a Select Box Link field are considered linked to an entry with id = 0. I had to use not:0 to exclude those with no related entries. It's probably a feature, but I've missed it or forgotten about it (: !

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