This question about Using an extension: Asked

GRID with dbcache connector: How to exclude a topic?

For performance reasons, I would like to use the dbcache connector rather than the search connector. However, I have problems excluding unwanted topics containing the same form, e.g., a *Template topic like NewUserTemplate.

This code works:
%GRID{ 
  connector="search"
  form="UserForm"
  query="form.name ~ '*UserForm' AND NOT name ~ '*Template'"
  columns="Topic,FirstName,LastName"
  web="%USERSWEB%"
  sort="LastName"
}%

But it will display an empty table when setting the connector to dbcache. Supposedly because dbcache has problems with the NOT operator. Instead, the "! =" operator (without the whitespace in between) can be used, which works for form fields (e.g. Status "! =" 'retired'), but doesn't seem to work with the topic name. First of all, there doesn't seem to be anything like "! ~". But also specifying the full template name does not prevent it from being listed:
%GRID{ 
  connector="dbcache"
  form="UserForm"
  query="form.name ~ '*UserForm' AND name != 'NewUserTemplate'"
  columns="Topic,FirstName,LastName"
  web="%USERSWEB%" 
  sort="LastName"
}% 

Any ideas? Anyone?

-- PhilippLeufke - 25 May 2013

As a first workaround, which of course won't work for any use case, I am now filtering out any topic with and empty LastName field, which should usually only match the NewUserTemplate:

query="form.name ~ '*UserForm' AND LastName != ''"

A real solution, however, would still be welcome...

-- PhilippLeufke - 26 May 2013

The query language has to match the one of the backend you choose. This is different for SEARCH, DBQUERY and SOLRSEARCH.

Try topic instead of name using the dbcache connector.

-- MichaelDaum - 27 May 2013

Thanks, that worked out, using "topic =! 'NewUserTemplate'"

However, is there any way to get the unsharp '*Template' filter working with the NOT operator? This would be useful, when several similar named topics are to be excluded...

-- PhilippLeufke - 02 Sep 2013
 

QuestionForm edit

Subject Using an extension
Extension JQGridPlugin
Version Foswiki 1.1.8
Status Asked
Related Topics
Topic revision: r4 - 02 Sep 2013, PhilippLeufke
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy