# How to sort taskdata by using variables

**URL:** <https://forum.flowable.org/t/how-to-sort-taskdata-by-using-variables/7820>\
**Category:** Flowable Engine\
**Created:** [May 4, 2021, 4:12pm UTC](https://forum.flowable.org/t/how-to-sort-taskdata-by-using-variables/7820 "2021-05-04T16:12:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zonera72](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/zonera72/32/2383_2.png) [@zonera72](https://forum.flowable.org/u/zonera72)\
**Post date:** [May 4, 2021, 4:12pm UTC](https://forum.flowable.org/t/how-to-sort-taskdata-by-using-variables/7820/1 "2021-05-04T16:12:31Z")

</div>

Hi, thanks for dropping by.  
I just started exploring flowable and hence my knowledge may lack while explaining my question.  
I wanted to ask how to sort the tasks on the basis of variables present in taskdata,  
for instance , I am getting this response when I am hitting the endpoint, so can I sort  
these task for example on employee basis? if yes then please explain.

“taskId”: “5c5334cd-acca-11eb-8c06-c8e26580c0af”,  
“taskName”: “lead Check”,  
“taskData”: {  
“noOfHolidays”: 3,  
“description”: “sick leave”,  
“employee”: “jessy”  
}  
…  
…  
\<\ ***more tasks like the above one** \>

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)\
**Post date:** [May 12, 2021, 9:34am UTC](https://forum.flowable.org/t/how-to-sort-taskdata-by-using-variables/7820/2 "2021-05-12T09:34:16Z")

</div>

That option is not available in the java/rest API currently, that would need to be done with a custom query.
