a table with sub child table.?

a table with sub child table.?

  

Hi all,

I want to store a child table in the parent table identifier..?

For example

student:(Child Entity)

ID:

Name:

Address:

I want store that sub entity in the Parent Entity

Class:(Parent Entity)

ID:

Class Room No:

so requirement is a class id having many students.

Please model this is in database as one to many relation. Every class has multiple students.

So - the student entity will have a Foreign key to the class entity.

In Outsystems, you can define these relationships when creating your database model.

It's not the case that you can add one entity as a child of another entity. You need to model the relationship using the foreign key appropriately.


Please go through the database modelling tutorial in the web development course of the Outsystems training platform.

Solution

Hi,


In child table add id attribute of parent table identifier it will established the one to many relationship(like primary/foreign key).


Thanks!

Solution

thanks...JitendraYadav 

i completed 50% answer by doing this and after i need to store data into child table with parent table identifier.?so parent table having a id like link when i press that it will redirect to child table form and once i save that form data it has to be stored in the identifier..? 

i m kind of new for out systems..!

Ok..good let share the snap for the required scenario.

manikanta parupallly wrote:

thanks...JitendraYadav 

i completed 50% answer by doing this and after i need to store data into child table with parent table identifier.?so parent table having a id like link when i press that it will redirect to child table form and once i save that form data it has to be stored in the identifier..? 

i m kind of new for out systems..!

Please follow the tutorial. This question will be answered if you go through the tutorials first. It has similar examples. This is a master-detail UI pattern.


Still, I am mentioning the approach

1. Create a list record where you show all the Class records on a webpage.

2. Have a link on the name of the class.

3. When the user clicks on the name of the class - use the navigate method to redirect to another webscreen.

4. In the other webscreen - have a parameter for the ClassId. In the preparation of this webscreen - fetch the students for this ClassId. You can use an aggregate for this.

5. Then display the list records for the students using the list records fetched. On this same webscreen you can specify the actions for adding a new student. You will have the reference to parent classId from the parameter.


I have tried to describe the process here.

But, it looks like you have not completed the training of web application development. Please complete it - and you will get the clear idea. 


For reference, here is the link to the tutorials: https://www.outsystems.com/learn/courses/15/developing-outsystems-web-applications/


The training also has practical exercises. Make sure that you dont skip the practical exercises.

Please check attached oml file.

and mark this post as solution...Thanks!

@JitendraYadav, while it is a good thing that you have implemented and shared the implementation  - in the long run the OP is not being helped.

The question he has asked is very basic in OutSystems. When someone asks a basic question - you don't hand over the actual implementation to them.

The OP should first be completing the tutorials before asking basic questions.

"Teach a person to learn by himself , don't spoon-feed"


@manikanta, make sure you complete the training before posting such questions.

Hi chetan,

Yes but for better understand we should help with some example.


Thanks!

JitendraYadav wrote:

Hi chetan,

Yes but for better understand we should help with some example.


Thanks!

The training has the example. What you have done is given the solution. The person should himself arrive at the solution by taking efforts. 


In this case:

1. The question asked is a basic scenario

2. The basic scenario is covered in training

3. The training also has hands-on exercise and these examples.

4. Experienced people in OS can handout the solution to novice developer - but they will not immediately understand the code if they have not even completed the training.

5. The forum should be used to guide in the correct direction.

6. Unless its a very complex, tricky scenario required - no need to hand over the solution. Where is the fun for the OP to solve a problem and learning something on his own.  The OP will take some time , will struggle for a day or two - but he will learn to actually implement by himself. We can give the correct directions to help in such basic scenarios.


Chetan Yewale wrote:

JitendraYadav wrote:

Hi chetan,

Yes but for better understand we should help with some example.


Thanks!

The training has the example. What you have done is given the solution. The person should himself arrive at the solution by taking efforts. 


In this case:

1. The question asked is a basic scenario

2. The basic scenario is covered in training

3. The training also has hands-on exercise and these examples.

4. Experienced people in OS can handout the solution to novice developer - but they will not immediately understand the code if they have not even completed the training.

5. The forum should be used to guide in the correct direction.

6. Unless its a very complex, tricky scenario required - no need to hand over the solution. Where is the fun for the OP to solve a problem and learning something on his own.  The OP will take some time , will struggle for a day or two - but he will learn to actually implement by himself. We can give the correct directions to help in such basic scenarios.



See every course have book and training materials but still we search solution on google  for quick resolution irrespective of level of complexity .

Why?

The reason is that somebody want to learn or want to implement the solution.

So you are saying to learn and i am giving solution to learn from given solution.

Please correct me if i am wrong.

@JitendraYadav,

No - we do not search for solutions on google for basic questions like these which are already covered in the training. This question is the  "ABC of Outsystems". No one searches for ABC on google.

At-least the good developers do  not search for google - before doing their study in the technology they are working and getting the basic facts about what they are working on.


Giving a solution to learn != giving the actual solution which is an implementation.

The solution in this case - is giving a direction which will lead the person to do some self-study and arrive at the solution.

In this case - there is no need for quick resolution.

Obviously if the person does not know master detail - I don't think they are working on an actual project yet. They are still in discovery phase of OutSystems or evaluating it.

Thanks arjun ..u can ping(Message) me for help to understand the out systems!