Using a dropdown to filter data in a repeated field

Screenshot 2022-07-01 at 12.25.55

I currently have data in a repeat which gets a filepath and file names from a firestore database. In the database is also a tag against the file for Department. How would I get the dropdown value to filter through the repeated data?

For example if the dropdown value was “marketing” it would only show documents with department of “marketing”?

Please, watch this video. it really helped me: