modifyObjectProperty doesn't work

I have a table with many rows where I’m trying to find item created by my previous script. I have an object which is pointing on first row of table. I would like to modify this object xpath that it will check each row until it will find row created by me.
I have such script which is always pointing to row 1. What is wrong in this code?

def expenseReport = WebUI.getText(findTestObject(‘ExpensePage/Approvals/td_SubmittedExpense’))

int i = 1

while (expenseReport != (GlobalVariable.ExpenseReportName)){

i++

new_td_SubmittedExpense = WebUI.modifyObjectProperty(findTestObject(‘ExpensePage/Approvals/td_SubmittedExpense’), ‘xpath’, ‘equals’,

‘//*[@class=“global-alllines”]/div//div[${i}]/table/tbody/tr/td[2]’, false)

expenseReport = WebUI.getText(findTestObject(‘ExpensePage/Approvals/td_SubmittedExpense’))

}