I have been doing something for a long time by making group template. But haven’t been able to make it yet. I want you to help me in this. I want to create a group template in this way. As you can see in the image below.
Below I have given you the image of two tables, with the help of which I have to generate the group template. As you can see in the image, I have highlighted two columns. I want that when I select [Start date] and [End date] in the column of "PDF Scan Sheet" Table then [DATE] and [CHANNEL] group should be generated in PDF, And its [Quantity] should be SUM together.
Error 1 : ‘Process for PDF template - 1’ task ‘Auto Update’ Body template. Expression ‘SUM( SELECT(SCAN SHEET[Quantity], ([_THISROW].[DATE] = [CHANNEL])))’ is invalid due to: Error in expression ‘[_THISROW].[DATE]’ : Unable to find column ‘DATE’.
One thing that jumps out at me is that there are several table references and its not clear how they fit together. First, the Bot is triggered by and add/update to a row in a table named “PDF Template”. It is this row that is sent to your PDF Template so any usages of [_THISROW] will be referring to the PDF Template row. I don’t see the definition of this table so it’s hard to determine if your expressions are referencing the correct thing.
In the “Date Group” column of the PDF table, you need a way to provide a UNIQUE list of the value you wish to use as the Group Name and then access that value in the SUM() expression. I don’t see how that can work with the expressions you have in the template now - BUT I don’t yet know all the details.
Which column value in which table do you wish to show in the “Date Group” column of the template table?
No no no. In order to accurately direct you to make the proper changes in your template we will need to understand ALL of the Tables involved and how they are related. You have given some but then covered table names so we can’t reliably tell what table is used where to make sure everything lines up like it needs to.
UPDATED: The below is incorrect. [_THISROW-1] refers to a row from an outer expression when there are nested expressions one inside the other. However, [_THISROW] does refer to the row passed into the template form the Bot.
To start, your bot refers to a table named “PDF Template”. A row in this table triggers the bot and sends that row to the template. In the template, the expressions refer to [_THISROW] and [_THISROW-1] - both of which refer to the PDF Template row being passed in. More critically, [_THISROW-1] refers to the _Parent o_f the PDF Template row passed in. Do you even have a Parent reference implemented? If so, how is it related?
Where are you setting the value for the Date Group? There is no column assigned.
How do you tie the values used in the Date Group to the Total Qty to make sure the summed values are related to the Date Group value? I don’t see anything that provides that correlation
These things might be hidden in the way you named columns but we can’t give accurate advice if we don’t understand the relationships and correlations.
I have no idea what this means in relation to your prior questions.
For your template to show a value in the Date Group column, you MUST explicitly specify the column you want shown. I’ll assume its the [Date] column so you would need to adjust your expression like this (the red text is the new part):
I wonder though if this expression will give you the Date Group results you want. I suspect you will see the same Date multiple times but since I don’t really know your data I am guessing.
As I understand it, you have a data table (CAMPUS SCAN SHEET) and a report filter table (PDF Template).
I recommend you watch the following video to understand the basics of creating a PDF template.
[Report Table [BUILD] | Foundation - YouTube](https://www.youtube.com/watch?v=WJuy-UMXvo0)
I just saw that you created a filtered ref column, which you could just put in the start expression.
<<Start:[REPORT PRINT)>><<[DATUM]>>
@WillowMobileSys I have been trying to create a group template for a long time. But I haven’t been successful yet. Tell me the whole process how to make group template. With the help of reference table.