Design Studio Select Line Solution 2

My previous solution example was based upon pressing a button in the form's header and detecting which line(s) had been selected within the detail section.

My client decided to add the button to the detail section (so it would appear on each line) and came up with this method of identifying which line's button was clicked:

if (id != "push2") return true
{
Invoice = lawForm.getDataValue("APD-INVOICE",formState.currentRow)
Vendor = lawForm.getDataValue("APD-VENDOR",formState.currentRow)
DisplayImageWeb()
}

The only downside to this method is that the button appears on each line of the form whether or not there is data associated to that line and the user could press the button on a line with no data.