Hi @ckissi!
You’d want to use the additionalScope option in the trigger method to pass in the i or the table1.data[i].id value. That would look like this:
line_items.trigger( {
additionalScope: {i:i}
} );
There’s some more info and examples on that here: https://docs.retool.com/docs/scripting-retool#querytriggeroptions