Help with Custom code in BPM

So I am getting the email address now however I am stumped as to how to reference the OrderNum in the first query without hard coding it. I tried declaring a variable and setting it to ttShipDtl.OrderNum and it works but only when there is one line in the order otherwise I get an error. Im sure it is something really simple I am overlooking here… when I try to put ttShipDtl.OrderNum in the == query it throws an error?