PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Form with Linked Table
Form with Linked Table
Iniciado por Rich Scheuermann, 16,sep. 2005 00:30 - 2 respuestas
Publicado el 16,septiembre 2005 - 00:30
I have two tables defined in the analysis as
Organizations
ID = AutoIncrement
Other fields
OrgContacts
OrgId = Numeric
Other fields
They are linked 1 - n on OrgContacts.OrgId = Organizations.Id.
When I create a Form with Linked Table the OrgContacts.OrgId in the table is shown as a combo box with the caption of "Id Orgs".
When I test the form no records show in the linked table.
As an aside, when I create a window with just the table of OrgContacts OrgContacts.OrgId is also shown as a combo box.
What am I missing?
Thanks
Rich
Publicado el 16,septiembre 2005 - 23:31
Hi Rich,
Regarding the combo: check the RAD information in the analysis and the default control type.
Regarding the linked table make sure you have linked the data files in the analysis (by drawing a link between the tables).
Ideally (and for the readability of your data model) relations are made up by using identical names. E.g.: the primary unique key Organization.OrganizationID is a foreign key for OrganizationContact and is preferably stored there as OrganizationContact.OrganizationID.
This way WinDev will also automatically identify relations.
And another tip: good ERD/database design prefers singular names for database tables since one tuple (=record) represents a single instance of a data entity.
Cheers,
Peter
Publicado el 17,septiembre 2005 - 01:30
Peter,
Thanks, I will check the RAD info in the analysis for the control type.
I have set up the link in the analysis.
What I discovered was that there is a check box on the table's properties that says "Filter the table". When I checked that all is well.
I would think that the checkbox would be checked by RAD when you create a form with table ???
Rich
Hi Rich,
Regarding the combo: check the RAD information in the analysis and the default control type.
Regarding the linked table make sure you have linked the data files in the analysis (by drawing a link between the tables).
Ideally (and for the readability of your data model) relations are made up by using identical names. E.g.: the primary unique key Organization.OrganizationID is a foreign key for OrganizationContact and is preferably stored there as OrganizationContact.OrganizationID.
This way WinDev will also automatically identify relations.
And another tip: good ERD/database design prefers singular names for database tables since one tuple (=record) represents a single instance of a data entity.
Cheers,
Peter