Change text in repeater based on the content of a field in a collection linked to Wix Events

Amanda, I have a quick question regarding this code, which has been working perfectly.

I now need to also add an option to have the text on the repeater and the ribbon on wix events show “NEARLY FULL” when there are only 5 tickets remaining.

Can you help? Is that even possible?