How to filter dynamically on a many-to-one basis?
I have some pages that I would like to link together using their respective scaffolding data with Reporting.
In page 1 I have a form which, among other information, allows the user to enter a Type. It can be Type A or B or C or D (only one though).
On page 2 I have a form which, among other information, allows the user to enter a Type. It can be Type A and/or B and/or C and/or D (multiple may be selected).
At the bottom of page 1, I show which page 2s match this page's Type by using a collection text-filter on Page 1's Type and where they match on Page 2's multiple selection Type.
For example:
This works fine.
What I'm struggling with is doing it the other way around.
So, at the bottom of Page 2 (where the user can select multiple Types), I want to show where any of the Types they have selected matches with any Page 1s. Is it possible to iterate around the multiple types selected in Page 2, using replace and render or do I need to create multiple reports or is this an {expanding-report} (which I'm still trying to get my head around)?
Thanks in advance.
M
In page 1 I have a form which, among other information, allows the user to enter a Type. It can be Type A or B or C or D (only one though).
On page 2 I have a form which, among other information, allows the user to enter a Type. It can be Type A and/or B and/or C and/or D (multiple may be selected).
At the bottom of page 1, I show which page 2s match this page's Type by using a collection text-filter on Page 1's Type and where they match on Page 2's multiple selection Type.
For example:
{replace-and-render}
{replace-item:%type%}{get-data:instrumentType}{replace-item}
{replace-body}
{report-table}
{local-reporter:content:children|source=Analysis}
{collection-filter:data:applicableIssueType|matchItems=any}
{text-filter:reference:value|include=%type%}
{collection-filter}
{text-sort:content:title}
{local-reporter}
{report-column:title=Data Attribute|width=250px|link=true}{div:style=font-size:8pt}{report-info:content:title|link=true}{div}{report-column}
{report-table}
{replace-body}
{replace-and-render}
This works fine.
What I'm struggling with is doing it the other way around.
So, at the bottom of Page 2 (where the user can select multiple Types), I want to show where any of the Types they have selected matches with any Page 1s. Is it possible to iterate around the multiple types selected in Page 2, using replace and render or do I need to create multiple reports or is this an {expanding-report} (which I'm still trying to get my head around)?
Thanks in advance.
M
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.
-
Inappropriate?You should be able to use a modification of your other report. Something like this (assuming your 'Types' list is called 'instrumentTypes'):
{replace-and-render}
{replace-item:%types%}{report-info:data:instrumentTypes|separator=,}{replace-item}
{replace-body}
{report-table}
{local-reporter:content:children|source=Analysis}
{text-filter:data:applicableIssueType > reference:value|include=%types%}
{text-sort:content:title}
{local-reporter}
{report-column:title=Data Attribute|width=250px|link=true}{div:style=font-size:8pt}{report-info:content:title|link=true}{div}{report-column}
{report-table}
{replace-body}
{replace-and-render}
The key changes are using 'report-info' to generate a comma-separated list of the 'instrumentTypes', which is then injected into the 'text-filter' (which doesn't use collection-filter in this case since it is a single-select list-data field).
That should get you on the right track anyway.
1 person says
this answers the question
Loading Profile...



EMPLOYEE