Need help with custom keyword to perform actions on a table

Hello, I need some help .I have a table with list of tasks to be performed .The table size varies for each scenario.I need to click on a link in each row.As soon as I click the link , that row disappears from the table. I Need a custom keyword for this task to

def taskstobeapproved(List tasks, String Name, int a){
for (int i=0; i<tasks.size(); i++) { findtestobject'(xpath)[+a+]',true)
// clicking on current step - task findtestobject'(//a[text()="+tasks[i]+"]", true))

Hi, Thanks for reply.I am new to Katalon , can I know where should I implement this in my code?

The above document contains a link to a sample built-in project the Health Care sample project. You should go through the sample and understand it.