17
Views
8
Comments
Solved
Combobox sort
Question

Hello,

So I found Documentation about Combobox sorting, but when I sort entity by id, it still shows data sorted by names. Can you tell me why and what should I do?

mvp_badge
MVP
Rank: #2
Solution

Hi Gigi,

If you use an Entity as Source Entity of a Combo Box, it will sort the list according to the Order By Attribute of the Entity. If there's no Order By Attribute defined, it will sort based on Id.

However, if you specify the output of an Aggregate or SQL as Source Record List, the order that list has is maintained. Without seeing your code I cannot tell what exactly the problem is, but I would guess that you don't actually use the Aggregate output as Source Record List.

mvp_badge
MVP
Rank: #90

Hi Gigi,

I checked the mentioned requirement and for me it's working as expected, Could you please remove all the defined sorting statement from the Aggregate sort tab and re-define the sort statement manually and check once

Hope this helps you!


Regards,

Benjith Sam

mvp_badge
MVP
Rank: #2
Solution

Hi Gigi,

If you use an Entity as Source Entity of a Combo Box, it will sort the list according to the Order By Attribute of the Entity. If there's no Order By Attribute defined, it will sort based on Id.

However, if you specify the output of an Aggregate or SQL as Source Record List, the order that list has is maintained. Without seeing your code I cannot tell what exactly the problem is, but I would guess that you don't actually use the Aggregate output as Source Record List.

mvp_badge
MVP
Rank: #2

Can you share the Module so I can take a look?

Rank: #44551

Oh no sorry it works quite well, I thought I should've sort in Entity. I misunderstood  the idea but now I get it.

Thanks for help. I love this community