How to properly use Data Detail from a table within a repeat region (help!)

Thanks for the tips, I’ll see if this is causing performance issues. Will probably try move more of this to server side later anyway.