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
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Best Approach for Creating Subforms in nuBuilder
Re: Best Approach for Creating Subforms in nuBuilder
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
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.
-
- 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
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
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
Re: Best Approach for Creating Subforms in nuBuilder
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
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.