How do I use variable data obtained using get-data to filter pages from a local reporter
Asked by Surekha Gupta:

I am new to confluence and have two sets of pages, one set for 'feature status' and another for 'team status', both are children of a program page. A feature is worked on by many teams, and I want to be able to pull a report on all contributing teams in the feature page.

I want to allow the feature lead to type in the name of a team on feature page, and automatically report on the team's status. I have a live template called 'team rollup' and I tried to copy some concepts from other pages, e.g. using 'replace-and-render' but it does not work. Here is what I have:

h4. Feature XFT1{text-data:XFT1\|required=true}{text-data} Status  
{replace-and-render}  
{replace-item:%Param%}{get-data:XFT1}{replace-item}  
{replace-body}  
{table-plus:border=0\|cellspacing=0\|cellpadding=10\|sortIcon=true\|columnTypes=S,S,S,S,S,S,S,S,I\|columnAttributes=,,,style="text-align: center"}  
{report-table}{local-reporter:content:children\|source=IPOS Infrastructure Feature and XFT status}  
{text-filter:data:XFT Name\|include=.\*'%Param%'\*.\*}  
{natural-sort:data:XFT Status Color\|order=descending}  
{text-sort:content:title}  
{local-reporter}  
{report-column:title=Status}{report-info:data:XFT Status Color\|render=wiki}{report-column}  
{report-column:title=Area}{report-info:data:XFT Area}{report-column}  
{report-column:title=XFT}{report-info:content:title\|link=true}{report-column}  
{report-column:title=OPO}{report-info:data:OPO}{report-column}  
{report-empty}This is displayed if no results are returned by the reporter.{report-empty}  
{report-table}  
{table-plus}  
{replace-body}  
{replace-and-render}

THis bare minimum without having a variable 'param' works though, and pulls up the report of all teams that have 'Infra' keyword.

<br />

{table-plus:border=0\|cellspacing=0\|cellpadding=10\|sortIcon=true\|columnTypes=S,S,S,S,S,S,S,S,I\|columnAttributes=,,,style="text-align: center"}  
{report-table}{local-reporter:content:children\|source=IPOS Infrastructure Feature and XFT status}  
{text-filter:data:XFT Name\|include=.\*Infra\*.\*}  
{natural-sort:data:XFT Status Color\|order=descending}  
{text-sort:content:title}  
{local-reporter}  
{report-column:title=Status}{report-info:data:XFT Status Color\|render=wiki}{report-column}  
{report-column:title=Area}{report-info:data:XFT Area}{report-column}  
{report-column:title=XFT}{report-info:content:title\|link=true}{report-column}  
{report-column:title=OPO}{report-info:data:OPO}{report-column}  
{report-empty}This is displayed if no results are returned by the reporter.{report-empty}  
{report-table}  
{table-plus}

can someone help me find out how to allow user to input data and then use that data in text-filter within local-reporter?


Answers:
author: Kathryn Moye
body: We have had word from atlassian that if you are using injection when it calls for a regular expression: such as .\*%variable%.\*, it will not work.


author: Surekha Gupta
body: I see conflicting information about whether or not text-filter macro can take injected parameter in various user forums. Can someone confirm whether it can? I am using altassian confluence 2.10.3 and I do not know what version of reporting plugin I am using or how to find this version. Do I need to upgrade my plugin?


author: Kathryn Moye
body: This would be very helpful to me too. Here is my example.

```
&lt;ac:macro ac:name="list-data"&gt;  &lt;ac:parameter ac:name="blank"&gt;false&lt;/ac:parameter&gt;  &lt;ac:parameter ac:name="name"&gt;DocNumber1&lt;/ac:parameter&gt;  &lt;ac:parameter ac:name="atlassian-macro-output-type"&gt;BLOCK&lt;/ac:parameter&gt;  &lt;ac:parameter ac:name="separator"&gt;custom&lt;/ac:parameter&gt;  &lt;ac:rich-text-body&gt;    &lt;ac:macro ac:name="report-block"&gt;      &lt;ac:parameter ac:name="atlassian-macro-output-type"&gt;BLOCK&lt;/ac:parameter&gt;      &lt;ac:rich-text-body&gt;        &lt;ac:macro ac:name="grouping-reporter"&gt;          &lt;ac:parameter ac:name="as"&gt;datas&lt;/ac:parameter&gt;          &lt;ac:default-parameter&gt;page:title&lt;/ac:default-parameter&gt;          &lt;ac:rich-text-body&gt;            &lt;ac:macro ac:name="local-reporter"&gt;              &lt;ac:parameter ac:name="source"&gt;OPPIP:Cross Program Products&lt;/ac:parameter&gt;              &lt;ac:default-parameter&gt;page:children&lt;/ac:default-parameter&gt;              &lt;ac:rich-text-body&gt;                &lt;p&gt;                  &lt;ac:macro ac:name="text-sort"&gt;                    &lt;ac:default-parameter&gt;page:title&lt;/ac:default-parameter&gt;                  &lt;/ac:macro&gt;                &lt;/p&gt;              &lt;/ac:rich-text-body&gt;            &lt;/ac:macro&gt;          &lt;/ac:rich-text-body&gt;        &lt;/ac:macro&gt;        &lt;ac:macro ac:name="report-body"&gt;          &lt;ac:parameter ac:name="injected"&gt;true&lt;/ac:parameter&gt;          &lt;ac:rich-text-body&gt;            &lt;ac:macro ac:name="list-option"&gt;              &lt;ac:parameter ac:name="value"&gt;%grouped:datas%&lt;/ac:parameter&gt;              &lt;ac:rich-text-body&gt; &lt;/ac:rich-text-body&gt;            &lt;/ac:macro&gt;          &lt;/ac:rich-text-body&gt;        &lt;/ac:macro&gt;      &lt;/ac:rich-text-body&gt;    &lt;/ac:macro&gt;  &lt;/ac:rich-text-body&gt;&lt;/ac:macro&gt;&lt;ac:macro ac:name="report-block"&gt;  &lt;ac:parameter ac:name="injected"&gt;true&lt;/ac:parameter&gt;  &lt;ac:parameter ac:name="atlassian-macro-output-type"&gt;BLOCK&lt;/ac:parameter&gt;  &lt;ac:rich-text-body&gt;    &lt;ac:macro ac:name="local-reporter"&gt;      &lt;ac:parameter ac:name="source"&gt;OPPIP:Cross Program Products&lt;/ac:parameter&gt;      &lt;ac:default-parameter&gt;page:children&lt;/ac:default-parameter&gt;      &lt;ac:rich-text-body&gt;        &lt;p&gt;          &lt;ac:macro ac:name="text-filter"&gt;            &lt;ac:parameter ac:name="value"&gt;DocNumber1&lt;/ac:parameter&gt;            &lt;ac:default-parameter&gt;page:title&lt;/ac:default-parameter&gt;          &lt;/ac:macro&gt;        &lt;/p&gt;      &lt;/ac:rich-text-body&gt;    &lt;/ac:macro&gt;    &lt;ac:macro ac:name="report-body"&gt;      &lt;ac:parameter ac:name="injected"&gt;true&lt;/ac:parameter&gt;      &lt;ac:rich-text-body&gt;        &lt;p&gt;          &lt;ac:macro ac:name="report-info"&gt;            &lt;ac:default-parameter&gt;data:APS&lt;/ac:default-parameter&gt;          &lt;/ac:macro&gt;        &lt;/p&gt;        &lt;p&gt; &lt;/p&gt;      &lt;/ac:rich-text-body&gt;    &lt;/ac:macro&gt;    &lt;ac:macro ac:name="report-empty"&gt;      &lt;ac:rich-text-body&gt;        &lt;p&gt;Not Found&lt;/p&gt;      &lt;/ac:rich-text-body&gt;    &lt;/ac:macro&gt;  &lt;/ac:rich-text-body&gt;&lt;/ac:macro&gt;
```


Tags: local-reporter