Sintaxe ORDER BY and FILTER

Friends,

I'm having trouble improving this expression.
The expression is included in PDF creation.
Only the [NOME_PESSOA] column is referenced.
The expression works correctly, but it does not sort the names in ascending order.
I tried a few times to treat this field, but to no avail.

<<Start: ORDERBY(FILTER(โ€œDB_CHAMADAโ€,
                                                     AND( ([ID_DATA_CHAMADA]=[_THISROW].[ID_DATA_CHAMADA]),
                                                              ([PRESENCA]=โ€SIMโ€)
                                                     )
                                                ),
                                  [NOME_PESSOA], TRUE,
                                  [PRESENCA], ([PRESENCA]=โ€SIMโ€)
                  )>><<[NOME_PESSOA].[NOME_PESSOA]>>

deltai_0-1701199190050.pngdeltai_1-1701199226375.png

 

Solved Solved
0 5 274
2 ACCEPTED SOLUTIONS

ORDERBY uses [NOME_PESSOA] key values. Use [NOME_PESSOA].[NOME_PESSOA] instead.

Also I am not sure [PRESENCA], ([PRESENCA]=โ€SIMโ€ actually does. Do you need it??

View solution in original post

Right,

I do this creating field PDF and include the PATH. Its works for me.

Thanks

View solution in original post

5 REPLIES 5

ORDERBY uses [NOME_PESSOA] key values. Use [NOME_PESSOA].[NOME_PESSOA] instead.

Also I am not sure [PRESENCA], ([PRESENCA]=โ€SIMโ€ actually does. Do you need it??

Hello,

Thanks for your solution.

How i dont see my mistake? Rrrrrr

Please, let me make other question about this PDF: How to do download this file directly in smartphone after bot works?

AFIK, you cannot do that. You either send it attached to email or send the link so the person can download it manually.

Right,

I do this creating field PDF and include the PATH. Its works for me.

Thanks

The second parameter of orderby() is descending? and expects a TRUE/FALSE value, but it is false by default. If you want ASC, I think you want a FALSE there.

ORDERBY(FILTER(โ€œDB_CHAMADAโ€,
                                                     AND( ([ID_DATA_CHAMADA]=[_THISROW].[ID_DATA_CHAMADA]),
                                                              ([PRESENCA]=โ€SIMโ€)
                                                     )
                                                ),
                                  [NOME_PESSOA], FALSE,
                                  [PRESENCA], ([PRESENCA]=โ€SIMโ€)
                  )

Top Labels in this Space