In the table CIDA3 i have the field CODDMEDI ( foreign key of DMEDI3 ) saving its history to CIHS1.
My goal now is to be able to search the History in CIHS1 per entity ( CIEN1 is the N/N Table that connects CIDA3 to ENTI1 )
I've tried by inserting CIEN1 Foreign key into CIHS1 but it doesn't work as the History is beeing saved by a field inside CIDA3 that has no relation with CIEN1.
Is this goal possible to be achieved?
If i understood correctly, you wanna see CIHS1 records per CIDA3 that have at least one connection to ENTI1 through CIEN1.
THIS WAS NOT TESTED:
DB ENTI1 (filter by area CIEN1) -> DB CIEN1 (with information of CIDA3 to mimic irs selection, incuding CIDA3 PK as invisible) -> DB CIDA3 (skip if just one, which was selected in CIEN1 list) -> DB CIHS1
The goal here is to select and entity that exists in a connection with the CIDA3 using the filter by area. Then select the CIEN1 but showing the CIDA3 field to look like you're selecting that record, than the skip if just one to apply the filter to the CIHS1.
The question here is to know if the CIEN1 selection with the CIDA3 PK as a column will be or not used to filter the next list.
I've taken a look at your case, and here's my thoughts, to get it done, if i've understood it correctly:
Your model seems incomplete to achieve that. And what you've tried to do (CIHS1->CIEN1) is wrong, the relation is the other way around, and your problem is solved.
I'll explain, by using real names with association for your table namings:
In the order of events, you'll associate several Cities (CIDA3) to an Entity (ENTI1) through table CIEN1.
This means that when your History table (CIHS1) is created, by logic, it should also have several associations with an Entity, same ones as the original Cities table (CIDA3).
So, in the creation event of the History table, you'll need to add that information to CIEN1 (marking CIDA3's chieldren). There are many ways to achieve this, i'll assume you know them and i'll skip that part.
Now, you can have your menu entry of Entities -> History, directly, by using N:N (DC) menu list:
DB ENTI1 -> DC CIHS1 (fill CIEN1 as the N:N table on menu form), and that's it.
Hope this helps!
About This Community
|Asked: 5/15/20, 3:19 PM|
|Seen: 147 times|
|Last updated: 8/22/20, 3:40 PM|