add constraint to viewtable