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 |
---|---|
42 | |
25 | |
25 | |
16 | |
11 |