Hi,
We have a problem when we generate a CSV by a Bot
The CSV file duplicates some columns
This is the code:
<<START:ORDERBY(ORDERBY(ORDERBY(ORDERBY(ORDERBY(ORDERBY(SELECT(Correo ZN[_RowNumber];TRUE;TRUE);[Fecha_ref];);[Concepto];);[Legajo];);[lpd_descrip];);[Provincia];);[Empresa])>>“Empresa”,“Provincia”,“Lugar de Pago”,“Persona”,“Legajo”,“Concepto”,“Codigo”,“Fecha”,“Cantidad a Liquidar”
“<<[Empresa]>>”,"<<[Provincia]>>","<<[lpd_descrip]>>","<<[Persona]>>","<<[Legajo]>>","<<[Concepto]>>","<<[Codigo_Con]>>","<<[Fecha_ref]>>","<<[Cantidad a Liquidar]>>"<>
How do we eliminate the duplicates?
Your headers should be before the START expression, not inside of it.
We tried this option and the code stayed this way:
“Empresa”,“Provincia”,“Lugar de Pago”,“Persona”,“Legajo”,“Concepto”,“Codigo”,“Fecha”,“Cantidad a Liquidar”<<START:ORDERBY(ORDERBY(ORDERBY(ORDERBY(ORDERBY(ORDERBY(SELECT(Correo ZN[_RowNumber];TRUE;TRUE);[Fecha_ref];);[Concepto];);[Legajo];);[lpd_descrip];);[Provincia];);[Empresa])>>
“<<[Empresa]>>”,"<<[Provincia]>>","<<[lpd_descrip]>>","<<[Persona]>>","<<[Legajo]>>","<<[Concepto]>>","<<[Codigo_Con]>>","<<[Fecha_ref]>>","<<[Cantidad a Liquidar]>>"<>
And the result was that the information was in a single row
You need to add a line break in your template between headers and START.
So…
Then the formula should be like this:
“Empresa”,“Provincia”,“Lugar de Pago”,“Persona”,“Legajo”,“Concepto”,“Codigo”,“Fecha”,“Cantidad a Liquidar”
<<START:ORDERBY(ORDERBY(ORDERBY(ORDERBY(ORDERBY(ORDERBY(SELECT(Correo ZN[_RowNumber];TRUE;TRUE);[Fecha_ref];);[Concepto];);[Legajo];);[lpd_descrip];);[Provincia];);[Empresa])>>
“<<[Empresa]>>”,"<<[Provincia]>>","<<[lpd_descrip]>>","<<[Persona]>>","<<[Legajo]>>","<<[Concepto]>>","<<[Codigo_Con]>>","<<[Fecha_ref]>>","<<[Cantidad a Liquidar]>>"<>
And we let’s read the ORDERBY() article so as not to nest the expression
Also, you don’t need to nest ORDERBYs like that, a single ORDERBY() can accept any number of arguments.
User | Count |
---|---|
35 | |
30 | |
30 | |
20 | |
18 |