Hello,
I have been trying to solve the following problem for quite some time.
I have two tables as shown in the link.
Or shown directly here:
TABLE#1_ARP
| ARP# | TOPIC_CONNECTED_TO_ARP# |
|---|---|
| A 1.1 a | |
| A 1.1 b | |
| A 1.1 c | |
| A 1.1 d | |
| A 1.1 e | |
| A 1.2 a | |
| A 1.2 b | |
| A 1.2 c | |
| A 1.2 d | |
| … |
TABLE#2_TOPIC
| TOPIC | ARP# |
|---|---|
| TOPIC1 | A 1.2 e , A 4.2 b , A 1.1 b |
| TOPIC2 | A 1.2 j |
| TOPIC3 | A 1.2 e |
| TOPIC4 | A 4.2 b |
| TOPIC5 | A 1.2 j |
| TOPIC6 | A 1.2 e |
| TOPIC7 | A 1.2 e |
| TOPIC8 | A 1.2 e , A 4.4 f |
| TOPIC9 | A 1.2 j |
| TOPIC10 | A 1.2 j |
| TOPIC11 | A 1.2 j |
| TOPIC12 | A 1.2 e |
| TOPIC13 | B 5. a |
| TOPIC14 | B 5. a , B 5. b , B 5. c |
| TOPIC15 | B 5. a |
| TOPIC16 | A 3. b |
What I am trying to achieve is to list all topics from TABLE#2_TOPIC that are connected to an ARP#. The list should be in TABLE#1_ARP under TOPIC_CONNECTED_TO_ARP#.
I assume I can use the SELECT() operator here. I What I’ve tried so far in TABLE#1_ARP and column TOPIC_CONNECTED_TO_ARP# (as virtual column).:
SPLIT(TOPIC[ARP#], " , ")
This lists all ARP#s in each line. Like that:
A 1.2 e , A 4.2 b , A 1.1 b , A 1.2 j , A 1.2 e , A 4.2 b , A 1.2 j , A 1.2 e , A 1.2 e , A 1.2 e , A 4.4 f , A 1.2 j , A 1.2 j , A 1.2 j , A 1.2 e , B 5. a , B 5. a , B 5. b , B 5. c , B 5. a , A 3. b
And then with:
IN( [TOPIC_CONNECTED_TO_ARP#], SPLIT(TOPIC[ARP#], " , ") )
Here I get a yes or no answer as to whether TABLE#1_ARP[TOPIC_CONNECTED_TO_ARP#] is included in TABLE#2_TOPIC[ARP#] or not.
Then I tried using the SELECT() operator to collect the TOPICS in each row of TABLE#1_ARP.
SELECT(TOPIC[TOPIC],
(IN([TOPIC_CONNECTED_TO_ARP#],
SPLIT(TOPIC[ARP], " , "))
)
)
Unfortunately, nothing else happens and nothing is listed. When I use the SELECT() function with TRUE,TRUE, all topics in TABLE#1_ARP[TOPIC_CONNECTED_TO_ARP#] are listed, regardless of whether they were assigned to TABLE#2_TOPIC[ARP#].
AI was no help here either. Maybe someone can help?
Thanks