Default value of sub-table to foreign key
Default value of sub-table to foreign key
If People is the main table and each person can have many Dogs. They are linked with the PeopleID Primary Key from the People table and the PeopleID in the Dogs table one to many. When in the People table and you want to add a new Dog, is it possible to make the PeopleID in the Dogs table default the PeopleID from the originating People deatil view where we clicked on Dogs? That way the IDs of both tables can be hidden from users but will automatically have the right Dogs linked to the right People?
-
- Posts: 10
- Joined: 2013-06-04 21:26
Re: Default value of sub-table to foreign key
1. To have the value of PeopleID assigned and not changeable
in the templates/Dogs_templateDV.html file for the field PeopleID change
%%COMBO(PeopleID)%%
to
%%VALUE(PeopleID)%%
2. To hide all of this, use css to set display:none
http://www.w3schools.com/css/css_display_visibility.asp
This would also be a good enhancement to make a clickable option on the developer side....
in the templates/Dogs_templateDV.html file for the field PeopleID change
%%COMBO(PeopleID)%%
to
%%VALUE(PeopleID)%%
2. To hide all of this, use css to set display:none
http://www.w3schools.com/css/css_display_visibility.asp
This would also be a good enhancement to make a clickable option on the developer side....