Comparison of different tables


I use EDT with great pleasure, and many good results are obtained.
However, there is one non-trivial task, at least it seems so to me, so I ask for the help of specialists. Of course, I do not know if it is possible to solve this problem without complex programming, but I decided to ask this question on the forum. I would be very grateful if someone would tell me.
Brief description of the task – it is necessary to compare two tables and, if certain conditions coincide, create table 3, or create table 4.
The original tables are quite similar, but one has additional data.
The main table 1 is compared with table 2, which has an additional column Year.
It is necessary to compare the value from Object 1 (table 1) with the value in Object A (table 2), and then sequentially the values of Subobject 2, Subobject 3, Subobject 4, Subobject 5 (table 1) with the values of Subobject B, Subobject C, Subobject D, Subobject E (table 2). If there is more than one match, put the Subobject in a separate column Result (Named Subobject 2-5 = B-E). Also, add the Year column to table 3 with the corresponding value.

If a comparison between Subobject 2, Subobject 3, Subobject 4, Subobject 5 (table 1) and Subobject B, Subobject C, Subobject D, Subobject E (table 2) does not reveal any matches, then create a new table 4 in which to show a match between Object 1 and Object A, and add the Named columns galaxies and Year&

Examples of input data are shown in galaxies.transform, the desired forms of output tables are also given there.
galaxies.transform (5.0 KB)

Are 2 values considered the same if they are both blank?

Empty values of Object and Subobject in this solution are not interested at all.
Also, an empty Year value is not taken into account.
Thank you so much for your interest in my question!

That makes it quite a bit more complicated.

It would probably take me an hour to try and understand what you are trying to do, and I’m afriad I don’t have the time for that. However I have made a start, hopefully you can modify this to get what you actually want.

galaxies-modified.transform (7.2 KB)

1 Like

Andy, thank you so much for your help, since I haven’t mastered JAVASCRIPT yet.
And I want to express a special thank you for the quick response.
I’ll work on the solution you sent. I hope everything will work out. But suddenly there will be questions then I will contact.

Andy, you just have a great solution. I have understood the principles and have already done what I need!
Thank you very much!
Just in case, I’ll attach a modified solution. :handshake:
galaxies-modified 2.transform (9.9 KB)

1 Like