Page 1 of 1
n:m connections / subforms
Posted: Mon Mar 30, 2020 4:14 pm
by stlas
Hi,
i am new to nuBuilder Forte and have tried to realize a n:m table-connection. For example: many organizations can have many persons and one person can be a part of many organizations. How is it realized with nuBuilder? Has anyone a hint for me? I thought there are three tables: organization, persons and org_per, where the connections are collected. But I don't know how to handle this with nuBuilder.
And until now I could not realize a subform properly. In which table is the foreign key located?
If it is are stupid questions, sorry for that! And sorry for my English...
Thanx for supporting me.
Stefan
Re: n:m connections / subforms
Posted: Mon Mar 30, 2020 8:27 pm
by admin
Stefan,
There are 2 tables used user and access level. (many users to each access level.
Steven
Re: n:m connections / subforms
Posted: Sun Apr 05, 2020 5:13 pm
by stlas
Hi,
thank you for your answer and please excuse my late reaction.
Is it possible to create a Subform manually? Where can i change the foreign-key?
Thank you!
Stefan
Re: n:m connections / subforms
Posted: Sun Apr 05, 2020 5:27 pm
by kev1n
The easiest way is to use the "Form Builder". Then you can enter the foreign key in the "Foreign Key Field Name" field.
ff.png
Re: n:m connections / subforms
Posted: Mon Apr 06, 2020 12:52 pm
by stlas
Hi ,
is there another possibility? I want to edit an already existing subform.
Thank you.
Stefan
Re: n:m connections / subforms
Posted: Tue Apr 07, 2020 6:43 am
by Janusz
Hi,
You can add subform manually, but need to spent more time comparing to the FormBuilder.
When you are on the form you would like to add the subform press: CTRL+Shift+o (to go to objects list)
then: Add
Type: Subform
(plus other required data)
go to Subform Tab:
indicate existing form to be used as subform (you should have it created before)
enter the foreign key to link the subform with the main form.
the Foreign_key is the column in the subform table which keeps the primary key of the main form record.
Ex. if the main form table "companies" has the following structure:
company_id, com_name, com_address, .....
so the subform table "subsidiaries" should look like this:
subsidiaries_id, sub_comp_id, sub_address, sub_sales, ....
the link between both is kept in the sub_comp_id which in fact will store the company_id of the main record
so the Foreign_key in the subform is the sub_comp_id
Re: n:m connections / subforms
Posted: Tue Apr 07, 2020 9:38 am
by kev1n
stlas wrote:I want to edit an already existing subform.
Open the properties of your existing subform object and enter the foreign key.
foreign_key.png