Hi Sai,
In the second form’s table, group the fields based on your requirements i.e two fields in group1 & all five fields in group2.
Now use this two groups in your second form and in the init method you can visible the groups based on the field value
Ex:
Forms init method
if(tablefield == 2)
group1.visible(true)
group2.visible(false)
else if(tablefield == 5)
group1.visible(false)
group2.visible(True)