Hello!
I created a table in a template in Google Doc and I needed to show inside the table dynamic rows depending on the new order recorded in my table.
So my Start expressions is like this: <<Start: Select(MyTable[ID], AND([ColumnSelectat]=1, [ColumnIDdeterminare]<>9999, [ColumnIDCategorieDeviz]=1, [IdSubcategorieDeviz]=11, [Order]=[Order]))>><<[ColumnTipDeterm]>>.... on the same line I put the needed columns (Number of test, Price, Value) then <<END>>. It works very well.
But I also need to have a row with the Total Value, I calculated as a Virtual Column in MyTable, but I don't know how I could integrate in the same Start/End expression. I made a new row Total Value then [TotalValue] column, but if there is data registered for this category, the line appears in the pdf line with no data, and I need not to be displayed if there are no rows calculated.
Thank you for helping me!
Regards!
Ruxandra
The idea is that, if for there is no data for
Solved! Go to Solution.
To add a "Total Value" row in ur Google Doc template, u can use one Start expression and an If condition to show the row only if there's data.
Try this:
<<Start: Select(MyTable[ID], AND([ColumnSelectat]=1, [ColumnIDdeterminare]<>9999, [ColumnIDCategorieDeviz]=1, [IdSubcategorieDeviz]=11, [Order]=[Order]))>>
<<[ColumnTipDeterm]>> | <<[NumberOfTest]>> | <<[Price]>> | <<[Value]>>
<<End>>
<<If: COUNT(Select(MyTable[ID], AND([ColumnSelectat]=1, [ColumnIDdeterminare]<>9999, [ColumnIDCategorieDeviz]=1, [IdSubcategorieDeviz]=11))) > 0>>
Total Value: <<SUM(Select(MyTable[Value], AND([ColumnSelectat]=1, [ColumnIDdeterminare]<>9999, [ColumnIDCategorieDeviz]=1, [IdSubcategorieDeviz]=11)))>>
<<EndIf>>
This will show the total row only if there are rows in ur table. If not, the row stays hidden.
Good luck!
To add a "Total Value" row in ur Google Doc template, u can use one Start expression and an If condition to show the row only if there's data.
Try this:
<<Start: Select(MyTable[ID], AND([ColumnSelectat]=1, [ColumnIDdeterminare]<>9999, [ColumnIDCategorieDeviz]=1, [IdSubcategorieDeviz]=11, [Order]=[Order]))>>
<<[ColumnTipDeterm]>> | <<[NumberOfTest]>> | <<[Price]>> | <<[Value]>>
<<End>>
<<If: COUNT(Select(MyTable[ID], AND([ColumnSelectat]=1, [ColumnIDdeterminare]<>9999, [ColumnIDCategorieDeviz]=1, [IdSubcategorieDeviz]=11))) > 0>>
Total Value: <<SUM(Select(MyTable[Value], AND([ColumnSelectat]=1, [ColumnIDdeterminare]<>9999, [ColumnIDCategorieDeviz]=1, [IdSubcategorieDeviz]=11)))>>
<<EndIf>>
This will show the total row only if there are rows in ur table. If not, the row stays hidden.
Good luck!
Hello again!
I applied your solution, but I am in this situation: there is a list of lines, some of them could be used and that means they should appear in my .pdf file, but the others should not appear.
I created a table and I have something like this for every Category and Subcategory, the problem is in my pdf the lines that user does not select (does not use) appear as empty lines in the pdf, this means that if he selects only 3 out of 120 lines, 117 empty lines will appear, which is not good. Is there any possibility to make the rows of the table to be displayed dynamically, as happens in the case of the <<Start>> expression? I tried to put all the expressions in the same row, but I get various errors.
Thank you!
This is an example of lines from my table:
Thank you!
Regards!
Hello!
Many thanks! It works.
Best regards!
Ruxandra
User | Count |
---|---|
36 | |
8 | |
3 | |
2 | |
2 |