Referencing records in extended tables

David165
Mega Expert

Hi 

I have a generic table "statement" that I then extend into several tables, each with some specific attributes. For example "Requirement" statements and "Design" statements.

Each statement type has its own form for entering data and from each form I want the ability to click a button to create a comment record to allow the user to record an opinion of the statement. The Comment record contains a reference back to the parent statement.

Because each table extends statement, and all the individual statements from the derived tables are available in the table "statement" I thought I could reference statement from my comments table. Then I could create a comment on a Requirement statement and it would reference the parent in the Statement table. I could also create a comment on a Design statement and it too would reference the parent in the Statement table. But this doesn't work.

It only works if I have an individual Comment table for each Statement table 

This is a diagram of what I was hoping to achieve:

find_real_file.png

 

From a previous post it was indicated that this design model should work. But when I create a Comment and the parent column references Statement the reference is empty when viewing the Comment. But if I change the comment. parent column to reference Requirement then the reference field is correct populated:

This is how the reference appears when it references one of the derived tables (project in this case):

find_real_file.png

This is how the Comment looks when the Parent column references Statement:

find_real_file.png

 

Can anyone suggest why the reference doesn't work correctly?

Thanks

David

 

 

 

 

1 ACCEPTED SOLUTION

David Stutter
Tera Guru

Looks like it is working fine the only problem is the display in the text field.

Have a look into the dictionairy of your base table, if there is no field configured with "display:true".

Or your reference field has specific attributes which access a field which is only available on the extended table.

View solution in original post

2 REPLIES 2

David Stutter
Tera Guru

Looks like it is working fine the only problem is the display in the text field.

Have a look into the dictionairy of your base table, if there is no field configured with "display:true".

Or your reference field has specific attributes which access a field which is only available on the extended table.

David165
Mega Expert

Hi Dastu

That was it, such a simple solution. I did have a field in my base table set to display, but the field wasn't populated and so displayed nothing. Having changed the base table to display a mandatory field the reference displays correctly.

 

Many thanks for your assistance.

David