Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.

Template not correctly formatting with Parent records

Greetings,

I am trying to create a template to generate session reports.

I have a table called “Sessions”

These record goals that were worked on during the session

Goals are grouped into domains.

Goals and Domains each have their own tables where information about them is stored.
Goals has a column referencing the domain that the goal belongs to.

Each session may only use a subset of goals from a subset of domains.

Within my session table I added two virtual columns

One for the Goals that were used for the session referencing the original goals table
One for the Domains that those goals that were used belong to referencing the original Domains table

In my template I used a <Start:> statement to select all the domains.

For each of the domains returned I added a sub <Start:> statement to only return the goals that belong to that domain.

When I generate the report I successfully only get the domains that were used, but below them are all the possible goals that belong to that domain and not just the goals that were used during the session.

I added some extra lines below the chart just to ensure that my statements should be working.

One referencing the Virtual “UsedGoals” column directly
One using a select statement instead.
You see these below the table in the template

Here is my template

Template

This is what it produces

Report

Here it is in word with what I am trying to achieve

Should be

3X_7_4_74ccfa334c10cc6ca2c6d25bcf89d7ed8dfdeb11.png

I am currently using
https://help.appsheet.com/en/articles/961746-template-start-expressions
to guide me though this creation process but have not found anything there that explains this.

Any ideas as to what I am doing wrong?

Thanks in advance

Solved Solved
0 13 585
1 ACCEPTED SOLUTION

Ok I got it to work

I had to abandon my Virtual Column “Usedgoals” and instead use the expression I used to form it inside of a filter

<<Start: [UsedDomains] >><<[Domain]>>
<<Start: Filter(Goals,AND(([Domain] = [_ThisRow-1].[Domain ID]),in([Goal ID],Select(CSOU[GoalRef],[Session] = [_THISROW].[Session ID]))))>><<[Goal]>>
<< End>>
<< End>>

View solution in original post

13 REPLIES 13
Top Labels in this Space