issues filtering and displaying a collection in a repeater

I have a collection which I’m trying to filter using an element called willDisplay which is set to either FALSE or TRUE. I’m setting this element in each item based on whether the postcode in that item is within a range (this range lookup is working correctly BTW).
I can’
Once the loop completes and the item elements have been set (or not), I’m trying to filter the repeater shown on the page, but nothing is showing up on the page, as if all items have been set to FALSE.
Could someone please check the code and make sure that I don’t have to do anything else to make sure the repeater is displayed, or whether I’ve got any of the other code wrong - thanks.

Then nothing displays on the page! :frowning:

Looking further into this, I believe that the issue is that I’ve changed the repeater items but this hasn’t been written back to the database. Then, when I filter the database, the values of TRUE have not been saved. If this is correct, could someone please tell me how to do this as I cannot work it out!

I think I need to update the database with the repeater values but can’t work out how to do this after I’ve made all the chnages in the repeater?!?!