dynamic filter based on table selected.

insert if there is not an id number when submitted
else update