# How to sort/filter dynamic dataset with non-database fields

**URL:** <https://forum.wixstudio.com/t/how-to-sort-filter-dynamic-dataset-with-non-database-fields/41585>\
**Category:** Ask the community\
**Tags:** question, code\
**Created:** [August 13, 2020, 5:34am UTC](https://forum.wixstudio.com/t/how-to-sort-filter-dynamic-dataset-with-non-database-fields/41585 "2020-08-13T05:34:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![agarwalvineet](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@agarwalvineet](https://forum.wixstudio.com/u/agarwalvineet)\
**Post date:** [August 13, 2020, 5:34am UTC](https://forum.wixstudio.com/t/how-to-sort-filter-dynamic-dataset-with-non-database-fields/41585/1 "2020-08-13T05:34:51Z")

</div>

Hi All,

I have a dynamic dataset of products and I display them using a repeater. I use $w( ‘#repeater1’ ).onItemReady to compute a ‘Recommendation’ rating for each product. This rating is computed on the fly and is not part of the product dataset. I display this rating using one of the elements in the repeater item.

How do I sort/filter the product list in the repeater based on this external value?

Here is my code snippet:  
$w.onReady( **function** () {  
$w( ‘#repeater1’ ).onItemReady(($item, itemData, index) =\> {  
**let** rating= calculateRating(itemData);  
$item( ‘#ratingsDisplay1’ ).rating = rating;  
});  
});

---

<div class="post-metadata">

**Author:** ![agarwalvineet](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@agarwalvineet](https://forum.wixstudio.com/u/agarwalvineet)\
**Post date:** [September 10, 2020, 8:32pm UTC](https://forum.wixstudio.com/t/how-to-sort-filter-dynamic-dataset-with-non-database-fields/41585/2 "2020-09-10T20:32:30Z")

</div>

@sapirh@yisrael-wix - Can anyone from Wix help?
