Hi all,

Hopefully you can help me figure out how to do the following for a web application: 


I want to add a form in which an admin can enroll a person for a specific course on a specific device.

All the data from the Person, Course and EnrollmentDevice Entities must be entered by this admin.

I was thinking about doing this in a form but I'm not sure how? 

The tutorials only explain how to do this with static entities and through the selection of a person. I need to add this data from scratch without referencing existing people, courses or devices. 

Hopefully you can help.


Thanks in advance!

Hi Scarlett,

From your model I see that a person can have multiple courses. A good option would be to have a person detail page and a person edit page. On the person edit page you would create and update the person. on the person detail page you would show the page details and a list of courses that person is enrolled.

Regards,

Marcelo

Marcelo Ferreira wrote:

Hi Scarlett,

From your model I see that a person can have multiple courses. A good option would be to have a person detail page and a person edit page. On the person edit page you would create and update the person. on the person detail page you would show the page details and a list of courses that person is enrolled.

Regards,

Marcelo

I need to be able to add a specific course for that person with that name and email address and specify the device that will be used. How would I be able to do this in a Person edit page when this data should be entered in the other entities? Or how do I link this data with each other so I can see which person is enrolled for which course and what the id is of the device they're using? I thought that should be done with the Junction Entity (CourseEnrollment ) 

The way I see it, the CourseEnrollment entity can't be used because I cannot enter the person's name and email only its ID but that is unknown. The same can be said for the data in Course and EnrollmentDevice.


Hi Scarlett,

Did you follow this course? Your case is the same case as Movies and Production Talent. In your case Movies would be Persons that can have multiple Production Talents in your case Courses.

Regards,

Marcelo

Marcelo Ferreira wrote:

Hi Scarlett,

Did you follow this course? Your case is the same case as Movies and Production Talent. In your case Movies would be Persons that can have multiple Production Talents in your case Courses.

Regards,

Marcelo

I did but perhaps I'm not exactly clear in what I want to do:

In this case I need to add the data to each Entity/Table individually which means there is no link between the three. In order to do that I need to let the user link them like in the tutorial but that seems very user unfriendly.

if i understand correctly you want me to create a Person screen in which I can create a new person.

Create a Course screen for adding new courses. 

Create a Device screen for adding new devices.

Create a view in which I show Person/Course/Device and do a GetPerson/Course/Device.

Make the user able to select one and then I need to fetch the other two in order to get the user to select them like in the tutorial with like a combo box in order to join them together? 


Surely there must be another better/ more efficient way to do this


Kind regards,

Scarlett

HI,

I only said the course screen and person screen. the Device I didn't even understood the concept but from your data model you can select it or add it while assigning a course to a person. You can even have an accelerator to create a new course when assigning then to a person. but its always nice to have the course list and course detail. 

If you prefer you can even have everything on the same form but i don't think it is user friendly.

Regards,

Marcelo

Hi Scarlett,

First of all, A Device ID is missing in your entities. Why don't you put Device ID directly in your enrollment Device entity. 

Second: don't understand your enrollment device ID in the enrollment entity.

If you have a enrollment that can be followed up in many devices that's the way to go

You may go by steps to create your data. 

First with person. People either are new or come from DB. If you already have one person, you may get its Id and create enrollments from there. Email data may come from DB otherwise you should start to create or update person's data first.

After creating your person, since your enrollment can only have one person you should had a course to enroll.Show a list of courses with indication of expiration data and pick one, then before finish pick a device. You have person ID, course ID from combo  you have data to create an enrollment, then you get your enrollment ID + device ID to create your device_Enrolment Data. You may use a local variables (type enrollment record and Device enrollment Record)) to assign each value to create a record.

I know how to connect the data and add when there's an already existing person, an existing course and an existing device.

The application should give create the possibility to add a new person, add a course (which might be a new or an existing one) and add the device they are going to use (Which also might be a new or existing one).

The Id of the device will be an indicator for a third party application that will do the device management. 

When there is data that exist I can connect them, that is something I understand. But is there a way to add all three at once from one form without having to navigate through different forms/screens to either "connect" them or add them?


The goal is to know which person is enrolled for what course and which device they are using.

Hi Scarlett,

Maybe you can check if person exists (by its email...). If not, create new person  (person name and email are enough data for your requirements to create a new person?)

Next on the flow, use that user Id and chosen course Id, use local variable to get a enrollment record to create an enrollment.

With the new enrollment Id created and your device Id (a bit puzzled about your data model on that ) create you device relationship.

All data are on the same form, the screen action that you have on the save button will do the enchained logic