Welcome to the nuBuilder Forums!

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

Best Approach for Creating Subforms in nuBuilder

Questions related to using nuBuilder Forte.
Post Reply
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

Best Approach for Creating Subforms in nuBuilder

Unread post by yvesf »

Dear All,

In nuBuilder, it's possible to create multiple forms for the same table, which allows for different ways to update the same data. Regarding subforms, I see two approaches:

Create a subform directly with a primary-foreign key relationship, which links it to the parent form.
Create a browse/edit form first and then transform it into a subform. This doesn’t require a primary-foreign key.
What is the recommended approach for flexibility and ease of use? Should we create subforms directly or start with a browse/edit form and later convert it into a subform?

Thank you for your guidance.

Best regards,

Yves
steven
Posts: 369
Joined: Mon Jun 15, 2009 10:03 am
Has thanked: 52 times
Been thanked: 52 times

Re: Best Approach for Creating Subforms in nuBuilder

Unread post by steven »

Hi Yves,

Can you explain your goal a bit more - what are the tables you want to create and why do they need to be linked?


Steven
A short post is a good post.
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

Re: Best Approach for Creating Subforms in nuBuilder

Unread post by yvesf »

Hello Steven,

I want to build a solution in nuBuilder that:

Lists related doctors for each patient in a 1-to-many relationship (each patient can have multiple doctors).
Allows creating doctors from two places:
- Directly within the Patient form (e.g., inline in a subform ).
- Independently via a separate Doctor form, accessible through a "Doctor" button.
My goal is to manage this relationship efficiently while ensuring a seamless way to create and list doctors for each patient.
What is the best way to do that with nubuilder ?
Yves
steven
Posts: 369
Joined: Mon Jun 15, 2009 10:03 am
Has thanked: 52 times
Been thanked: 52 times

Re: Best Approach for Creating Subforms in nuBuilder

Unread post by steven »

Yves,

I would create 3 tables.

1. doctor (whos ID is doctor_id) + other fields
2. patient (whos ID is patient_id) + other fields
3. doctor_patient with 3 fields (for the subform)...

doctor_patient_id - The Primary Key

dop_patient_id - The Foreign Key for the Subform

dop_doctor_id - if you use a Lookup Object for this ID you will be able to add Doctors on the fly.


Steven
A short post is a good post.
Post Reply