# Value List Sorting Issue

**URL:** <https://forum.servoy.com/t/value-list-sorting-issue/11413>\
**Category:** Classic Servoy\
**Created:** [November 19, 2009, 5:40pm UTC](https://forum.servoy.com/t/value-list-sorting-issue/11413 "2009-11-19T17:40:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ebrandt](https://avatars.discourse-cdn.com/v4/letter/e/96bed5/32.png) [@ebrandt](https://forum.servoy.com/u/ebrandt)\
**Post date:** [November 19, 2009, 5:40pm UTC](https://forum.servoy.com/t/value-list-sorting-issue/11413/1 "2009-11-19T17:40:37Z")

</div>

Hello,

I have a type ahead value list the displays a calculated value from a related table. I used the calculated field ‘tray\_desc’ :  
(return tray\_class + ’ | ‘+ tray\_name +’ | '+tray\_int\_calc; ) as the display value,

and the’ tray\_id’ field as the dataprovider value.

The problem I am having is trying to sort the value list by the display field, I have tried sorting the relation, sorting the value list by the display field, sorting the value list by the individual fields….nothing works.

I can manually sort by that field and it works fine. So it seems to be something with the valuelist.

Is there another way to approach this?

Windows Vista  
Servoy  
Version: 4.1.3 - build 672

---

<div class="post-metadata">

**Author:** ![mboegem](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/mboegem/32/4399_2.png) [@mboegem](https://forum.servoy.com/u/mboegem)\
**Post date:** [November 19, 2009, 7:17pm UTC](https://forum.servoy.com/t/value-list-sorting-issue/11413/2 "2009-11-19T19:17:59Z")

</div>

Sorting on calculated fields is not supported in Servoy.  
This is probably the problem you’ve ran into.

If you would be able to store the calculation (just add a column with the same name as the calculation to the database) sorting is supported and things should work.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![ebrandt](https://avatars.discourse-cdn.com/v4/letter/e/96bed5/32.png) [@ebrandt](https://forum.servoy.com/u/ebrandt)\
**Post date:** [November 19, 2009, 9:16pm UTC](https://forum.servoy.com/t/value-list-sorting-issue/11413/3 "2009-11-19T21:16:12Z")

</div>

Thanks for the reply… This is a stored calculation. Any other Ideas?
