Dear friends,
In my app I want to create a dynamic template whenever I make a checklist so that I can display only tthe filtered items in my ChecklisDetail table. Here is a sample of my table used to create the PDF template :
ChecklistTemplateItemId | ItemName | VehicleType | Category | Code | Checked |
T-ITEM207 | Feux | Camion Rigide | Trucks | A | ✅ |
T-ITEM208 | Détresse | Camion Rigide | Trucks | A | ✅ |
T-ITEM209 | Recul | Camion Rigide | Trucks | A | ✅ |
T-ITEM210 | Rétroviseur | Camion Rigide | Trucks | A | ✅ |
T-ITEM211 | Pare-brise - 20 cm | Camion Rigide | Trucks | B | ✅ |
T-ITEM212 | Pneumatiques | Camion Rigide | Trucks | A | ✅ |
T-ITEM213 | Goujons | Camion Rigide | Trucks | A | ❌ |
T-ITEM214 | Fuites | Camion Rigide | Trucks | B | ✅ |
T-ITEM215 | Ceinture de sécurité (3 points) | Camion Rigide | Trucks | A | ✅ |
T-ITEM216 | Bâche | Camion Rigide | Trucks | A | ✅ |
T-ITEM217 | Au moins une calle | Camion Rigide | Trucks | A | ✅ |
T-ITEM218 | Marche pied | Camion Rigide | Trucks | A | ✅ |
T-ITEM219 | Démarrage Moteur avec clé | Camion Rigide | Trucks | A | ✅ |
I want to display The items vertically like in my template as follows:
Currently I am using this code inside my google doc template:
<<Start: ORDERBY(FILTER("ChecklistDetail", [ChecklistID] = [_THISROW].[ChecklistID]), [ItemName])>>
<<[ItemName]>> | ||||||
<<[Image]>> | ||||||
<<[Checked]>> | ||||||
<<[Code]>> |
<<End>>
Your help is highly appreciated,
Best regards,
Solved! Go to Solution.
Here is something you could try.
In order to divide the filtered data into different groups, each of which corresponds to the individual column, you need to have sequential numbers attached to the data.
One way to do it is to copy the filtered rows' key column to a separate table, say table "Report", which enables it to use its [_RowNumber] for this purpose.
Then for each column of your template you can use an expression like
<<Start: SELECT(Report[id], MOD([_RowNumber], 6) = 2)>> ### = 2 should be changed to match the column
<<[id].[column of the original table]>> ### This is a dereference expression
...
<<End>>
Below is an example template that I tested with. Make sure that you enclose each column in a separate table cell and each cell height should be the maximum size for alignment.
This is a sample report
User | Count |
---|---|
16 | |
11 | |
9 | |
8 | |
4 |