Dynamic Lightbox From Repeater

You can either connect the dataset to the referenced collection and query it like you try to do today or use include in order to get the referenced fields and then perform the query on the results.