Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a table as shown below:
Field1 | Field2 |
A | B |
B | C |
D | C |
E | F |
G | F |
G | H |
I | H |
A in field1 is an equivalent to B in Field2 and B in Field1 is an equivalent to C in Field 2 and similarly D in field1 is an equivalent to C in field2.
If I create 2 list boxes for field1 and field2, and if I select value A in listbox field1, I want the values A (in listbox field1), B(in listbox field2 and listbox field1), C in (in listbox field2 and listbox field1) and D (in listbox field1) to be selected automatically since A,B,C,D are equivalent to each other. I have tried using triggers and select possible function but it is not able to perform as stated above.
Any help will be appreciated!
Thanks!
Ok, that's a bit tricky. Basically you have a hierarchy where you want to select the top node A and then select all the descendants as well. For that you need to remodel your data to build the necessary hierarchy tree. You can use the HierarchyBelongsTo function for that. See this blog post for an example: Unbalanced, n-level hierarchies