To start with your lookup table shows 'Realname,Username' but the data shows Smith, J ( LDN), smithj. So if you ran | inputlookup lookup1 your table is going to look similar to this:
Realname username
Smith J(LDN)
Andy H(LDN)
Tan Y(JPN)
Same goes for lookup2
Keep in mind a lookup table is a csv file which is 'comma' delimited. Meaning at every "," it sees, it interprets it as a break in the data.
You will have to either add a field for the first initial and location or combine them, if you need to maintain the two fields you currently have. The same will apply to lookup2.
As far as the search itself, I would try running an eval statement against both lookups. I don't have time to test the eval statements currently. I will try to do that later today, and add to this with the results.
... View more