Template: SELECT Distinct records OR Group By in Google Doc Template

Hello Team,

I have Quotation table (Parent) and multiple child tables that make up the entire Quotation like Cabinets, Shutters, Glass Dedo, etc. I am working on creating a PDF file for the Quotation. 

In each of the sub-part of the Quotation like Cabinets, Shutters, Glass Dedo, etc, I want a specific combination of the columns (like Material Type and Color) to be printed in the Quotation which is unique too. For e.g.: there are 5 entries with Material type - Glass and Color - Black: I want one entry to be printed in the Quotation along with the sum of the quantities of those 5 records. For every sub part, these combinations differ: Please refer to below entries for each of the sub part of the quotation:

JayG_0-1704041835278.png

To create these entries, I have created one virtual column in each of the table and I make this entry for every record so that in the template all I have to do this select distinct records!

Since this virtual column that I hold these entries is not a key of that particular table, SELECT expression with distinct records as true wasn't working. Hence, I had raised this issue in the forum Solved: Template: Start expression + Select unique values - Google Cloud Community. I was suggested to create a slice for every table with MINROW function to get distinct values and it works perfectly fine!

Post this I created a functionality to copy entire quotation as this is required by the customer. Solved: Re: Copy Functionality - Google Cloud Community. This was implemented and it works perfectly fine!

In this the problem is as follows:

1) In the original quotation I deleted some entries and added new ones, I observed they were not showing up in the quotation PDf file. It was random (no trend as such for a specific type of entry, for a specific sub part, etc.). I checked everything thoroughly and no logical explaination. I deleted entire quotation and created a new one, everything was working normally again

2) I then used copy quotation functionality, I noticed for copied quotation, no entries are showing up through the slices, however wherever in the quotation there are direct entries to the table, it works fine. 

Thats how I narrowed down my problem is with the slices and I researched and found that its an known issue since mid last year and I believe Appsheet hasnt provided its solution.  Slice view rendering wrong set of rows - Google Cloud Community

Now I am thinking of avoiding slices completely and trying to somehow find ways to have distinct records of my virtual column in the template. Please help!

Original Quotation (works fine):

JayG_2-1704042784326.png

Copied Quotation: (doesnt work even if relevant records are there in the table)

JayG_3-1704042858607.png

Please note: Data of Hardware comes directly from tables and not from slice, hence it is working fine

Slice definition:

JayG_4-1704042912345.png

Template rendering:

JayG_5-1704042945659.png

Please help!

 

 

 

 

Solved Solved
0 2 330
1 ACCEPTED SOLUTION

2 REPLIES 2

Hi @Marc_Dillon - Any suggestions please?

Top Labels in this Space