That worked - I put the whole XPath Query string in a variable instead of the just the index value and it worked.
I have seen other people use a variable in just the index, and it worked for them so I tried to figure out why it wasn't working for me. Turns out that the "value" I was trying to use was not compatible with the field I was trying to put it in. When I changed the value, I was able to use the variable in the index. @kchaluvadi but, I would not have been able to figure it out, if it wasn't for you. Thank you!