Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

n:m connections / subforms

Questions related to using nuBuilder Forte.
Post Reply
stlas
Posts: 3
Joined: Wed Mar 18, 2020 11:01 am

n:m connections / subforms

Unread post 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
admin
Site Admin
Posts: 2822
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 29 times

Re: n:m connections / subforms

Unread post by admin »

Stefan,

There are 2 tables used user and access level. (many users to each access level.


Steven
stlas
Posts: 3
Joined: Wed Mar 18, 2020 11:01 am

Re: n:m connections / subforms

Unread post by stlas »

Hi,
thank you for your answer and please excuse my late reaction. :D
Is it possible to create a Subform manually? Where can i change the foreign-key?
Thank you!
Stefan
kev1n
nuBuilder Team
Posts: 4416
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 74 times
Been thanked: 472 times
Contact:

Re: n:m connections / subforms

Unread post 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
You do not have the required permissions to view the files attached to this post.
stlas
Posts: 3
Joined: Wed Mar 18, 2020 11:01 am

Re: n:m connections / subforms

Unread post by stlas »

Hi ,
is there another possibility? I want to edit an already existing subform.
Thank you.
Stefan
Janusz
nuBuilder Team
Posts: 508
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 10 times
Been thanked: 18 times

Re: n:m connections / subforms

Unread post 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
If you like nuBuilder, please leave a review on SourceForge
kev1n
nuBuilder Team
Posts: 4416
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 74 times
Been thanked: 472 times
Contact:

Re: n:m connections / subforms

Unread post 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
You do not have the required permissions to view the files attached to this post.
Post Reply