(un)assigning related id to filtered (un)selected portal rows
I would like to place a yes/no field in a portal row, and a "submit" button outside the portal so that "yes" records, once the submit button is pressed, will be assigned an id related to a field in another related table. It's important, however, that if a record is selected and then deselected ("yes", whoops I mean "no"), it be treated as not selected.
The purpose (maybe there's a simpler way to do this) is to allow a user to assign a number of a payments to a single check. The payments will appear as portal rows, the user will go through and choose which they'd like to pay with that check.
Another important part of the problem is that I would like to assign this id only to visible portal rows (and not previously selected portal rows). For example, if on Monday I display five payments, and select three of them to be paid on Monday's check, and then come in Tuesday and see only the two that haven't yet been paid, and then select both of those to be paid on Tuesday's check, I don't want those that were put on the Monday check to appear again on Tuesday's. I assume I can handle that by just saying "if a record has an existing payment id, don't overwrite"?
One last clarification, in case it's helpful, the layout is based on the table which handles the checks (not the table that handled the individual payments).
Thanks for any help.