If I understand correctly, you want to assign a specific doctor to the appointment you are editing.
You can create a Select Box and bind it to the list of all doctors as the DataSource. Then, bind appointment.doctor as the selected element. This will ensure that the selected doctor is assigned to the appointment you are working on.
Here is an example with an Hotel as the Appointment and Destinations as the Doctors :
Entity selection and entity of Appointment are displayed using the datatable component
Next, add a new Entity of Appointment with a button
Slectbox can only display a maximum of 15 results
So I thought of a different way
Use the DataTable called by the Web Form Loader or the Data Table in Dailog
View the Doctor’s Entity Selection
There you can display an unlimited number of doctors
If i click on the specified doctor line, you will be returned to the data table screen of the appointment.
The name is displayed in the doctor of the Entity of the appointment
Add a patient in the same way as you have done so far
This will register a new appointment
I have one more question
I would like to know how 1-to-N and N-to-1 entities are connected
Which will be the primary key?
Another request would be:
Stored in the doctor’s data class with the doctor’s selection
I also want to display the attributes of the profession and job title in the columns of the data table of appointment
I want to display the attribute of the Doctor’s data class in the doctor.name of DataTable and the column of Doctor.Speciality
Which data source should I connect from?
What attribute is the dataclass of doctor and appointment connected?
I don’t quite understand what you are asking for. What is the problem here? You have one doctor linked to your appointment, right? In the datatable, you can display the doctor’s name by setting the doctorname column source to doctor.name. The datatable will act as if it is getting appointment.doctor.name, but I think you have already done that. Could you please provide some screenshots of what is going wrong in the preview and how you expect it to be displayed?
Ok, so if I understand correctly, you want to get the doctor’s specialty, name, and gender from the doctor data class in the appointment web form. In your database model, you already have a direct link between the appointment and the doctor.
To display everything as you wish in a datatable, set the datasource of the datatable to the selection of all your appointments. Then, in your columns, you should have something like this:
This will display the specialty in the column you want. You can do the same for the name, gender, etc.
Since your model has direct access to the doctor, you can use it just like you use the date.
So I have one question
In the data table of Appointments, what are the conditions for connecting the attributes of one appointment and the attributes of one doctor?
To use the data table as I showed you, you need to bind the appointment selection to the data table. In the structure of the data class for appointment, you have a doctor entity and a patient entity. If you had an entity selection for doctor, it wouldn’t be possible to display it the way you want.
The only condition I see is that the doctor needs to be an entity then you can display anything from doctor in your appointment data table
For instance
In the relation of appointment and doctor
It is about the case when you start operation
If you subsequently disconnect the relation and return it again
Is the connection state of the data preserved?
I would also like to know the details of how it works
I can’t find the key to connect order and order product
If that’s the case, can you reproduce it if you remove the relation attribute and create it again
in the left panel, below “dataClasses”, is there an “attributes” section?
that’s where you select the attributes that will appear.
also make sure the attributes are exposed for REST