Actually I got it wrong the first time, your solution is not hard coding :)
Now to provide more perspective, I have a collection A with n number of rows, I search on a fixed column in CollA for a value in another Collection B, if I find it, I need to retrieve the value on a column X in that row...