Is it possible to filter on a literal string (ignoring metacharacters) using the Reporting Plugin?
I'm using the replace-and-render macro to insert the page name into a text-filter. This works just fine until the page name includes the following characters: '(' or ')'... The text-filter macro uses regular expressions to include results which is great, but I can't find any way of controling the filter to perform a literal string match, ignoring any special meaning that regular expression assigns to certain characters. Example below. I'd be happy to hear about any way to achieve the same result!
{replace-and-render}
{replace-item:%page_title%}{report-info:content:title}{replace-item}
{replace-body}
{report-on}
{report-table:injected=true}
{combining-reporter:matchAll=false}
{local-reporter:content:children|source=Documentation}
{text-sort:content:title}
{collection-filter:data:doc_description|matchItems=any}
{text-filter:reference:value|include=%page_title%}
{collection-filter}
{local-reporter}
{local-reporter:content:children|source=Documentation}
{text-sort:content:title}
{collection-filter:data:doc_keywords|matchItems=any}
{text-filter:reference:value|include=%page_title%}
{collection-filter}
{local-reporter}
{combining-reporter}
{report-column:title=Document}{report-info:content:title|link=true}{report-column}
{report-column:title=Document Description}{report-info:data:doc_description}{report-column}
{report-empty}_No documents found._{report-empty}
{report-table}
{report-on}
{replace-body}
{replace-and-render}
{replace-and-render}
{replace-item:%page_title%}{report-info:content:title}{replace-item}
{replace-body}
{report-on}
{report-table:injected=true}
{combining-reporter:matchAll=false}
{local-reporter:content:children|source=Documentation}
{text-sort:content:title}
{collection-filter:data:doc_description|matchItems=any}
{text-filter:reference:value|include=%page_title%}
{collection-filter}
{local-reporter}
{local-reporter:content:children|source=Documentation}
{text-sort:content:title}
{collection-filter:data:doc_keywords|matchItems=any}
{text-filter:reference:value|include=%page_title%}
{collection-filter}
{local-reporter}
{combining-reporter}
{report-column:title=Document}{report-info:content:title|link=true}{report-column}
{report-column:title=Document Description}{report-info:data:doc_description}{report-column}
{report-empty}_No documents found._{report-empty}
{report-table}
{report-on}
{replace-body}
{replace-and-render}
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
The company marked this question as answered.
-
Inappropriate?You should be able to use the standard Regexp 'quote' pattern. Here, you'll have to quadruple-escape the backslash (due to macro and Regexp escaping the '\' character), unfortunately, but it will look something like this:
{text-filter:reference:value|include=\\\\Q%page_title%\\\\E}
The company and 1 other person say
this answers the question
-
Inappropriate?By the way, your {report-on} surrounding the report is redundant - it's not actually doing anything in this case. You could set 'injected=true' to do injection using {report-on} rather than {replace-and-render} if you wish.
-
Inappropriate?Thanks for the fast reply - I'm sure I had tried this, but after closer inspection and checking everything else thoroughly it works just fine! Thanks!
I’m thankful
Loading Profile...



EMPLOYEE