⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Crud approaching more than 1 Table



efdusernet
  • profile picture
  • Member

Posted 26 December 2015 - 14:54 PM

I have a simple question here.

 

I liked a lot of this component well done.

 

The question is: Am I able to build a CRUD touching more than 1 table? For example: I want to have a CRUD for the following:

 

Table QUESTIONS

IDQuestion

IDRightAnswer

IDKnowledgeArea

Question

IDExplanation

 

One Record in this table would contain:

IDQuestion   IDRightAnswer    IDKnowledgeArea    Question                                       IDExplanation

10                 2                          3                              What is the color of the sun?        The sun is a bla bla bla bla

 

Table KnowledgeArea

ID             Name

1               Phisics

2               Math

3               Astronomy

 

So, as this is normalized table, for those IDs (except for IDQuestion cuz it is PK and IDRightAnswer cuz its a FK) which is/are FK in the Questions table I would like to have the correlated values (text) from Original table displayed in the grid rather than the ID itself.

 

So, using the same example, for the column IDKnowledgeArea in the table Questions (its a FK here) the CRUD would bring a combobox with the original values (text) in the table IDKnowledgeArea  For example:

 

IDQuestion   IDRightAnswer    IDKnowledgeArea    Question                                       IDExplanation

10                 2                          Astronomy             What is the color of the sun?        The sun is a bla bla bla bla

 

I appreciate any answer.

Thank you

 


Amit Shah
  • profile picture
  • Member

Posted 06 January 2016 - 01:57 AM

Use set_relation - its the same.