set $keys[0] and $keys[1] to be 999999 and set flag fl_subform_join to be 1 if join_main_sub is selected.
TODO: patch the database for the new field