Start: Select() in Docs Template

Hello everyone.

I am using this formula on a Google Doc template for my PDF generation Workflow:
SELECT(Listas de asistencia[Nombre],and([_thisrow].[Fecha asamblea]=[Fecha asamblea],[Asistencia]=“asistencia”))

Which works perfectly and brings back these results in the PDF file:
3X_e_1_e1f15b31d7741dd81266f359724aa99f779a34cf.png

What Im trying to do is to present these into a table so they can sign next to their name…

I´ve tried
<<start: SELECT(Listas de asistencia[Nombre],and([_thisrow].[Fecha asamblea]=[Fecha asamblea],[Asistencia]=“asistencia”))>>
<<[End]>>

But this didn´t work. The PDF is not generated. So I went into the Workflow Log and found this error:
(the SELECT expression) should generate a List of Ref values. Please verify that it generates a List and that the contents of the List are Ref values. Ref values should come from the ‘Key’ column of the referenced table.

Im kind of stuck here, I dont understand why the expression works fine without the “start” function, and it doesnt when I try the enlist the results.

I also tried creating a Virtual column with the same SELECT formula, and added <<[VCName]>> to the Template. The test results of the formula for the VC are correct, but when the PDF is generated I just get blank spaces and commas (separators):
3X_7_4_74689d7d2c3e6bf6f6293164b0660c0e2a25ad65.png

Solved Solved
0 2 1,224
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4

The SELECT() expression used in a <<Start>> tag must produce a list of key column values; if it produces a list of anything else, it won’t work. Really, FILTER() is a better choice than SELECT(), as there’s no way to get the wrong values using FILTER().

Try this:

<<start: FILTER("Listas de asistencia",and([_thisrow].[Fecha asamblea]=[Fecha asamblea],[Asistencia]=“asistencia”))>><<[Nombre]>>
<<[End]>>

View solution in original post

2 REPLIES 2

Steve
Platinum 4
Platinum 4

The SELECT() expression used in a <<Start>> tag must produce a list of key column values; if it produces a list of anything else, it won’t work. Really, FILTER() is a better choice than SELECT(), as there’s no way to get the wrong values using FILTER().

Try this:

<<start: FILTER("Listas de asistencia",and([_thisrow].[Fecha asamblea]=[Fecha asamblea],[Asistencia]=“asistencia”))>><<[Nombre]>>
<<[End]>>

Thanks @Steve! Once more you nailed it!

Top Labels in this Space