[Help] A way to combine multiple relation columns in one Array column?

Hi Gliders,
It is my second week of using Glide and I’ve moved on to the Pro Plan as it looks very promising.
I’m sorry if this has been posted before, but looking around and searching didn’t get me what i was looking for so posting it now.

[What I’m trying to achieve]
I wanted to create a table as an end result of pulling multiple columns from different tables. A table where 5 x columns are displayed from 5 different tables.

Column 1 from Table 1 — Column 1 from Table 2 — Column 1 from Table 3 … and so on.

[What I’ve done so far]
image

I have created 5 different tables with their own specific columns in each of them and I’ve relations to pull each on them in the final master table.

[What do I need help with]
I want to now combine those relation columns in the master table into one column so I can display all of it in one table as an end result.

Hope I’m explaining it clearly and I’m using correct methods to achieve what I’m looking for. It would be great if you could suggest a way for me guys! Thank you!

It might be useful if you could describe what your ultimate goal is here?
Relations do not contain any data, so the concept of combining multiple relations into an array doesn’t really make any sense.

Do you just want use these relations in an Inline List component?
If so, then probably the simplest thing to do is use 4 components - one for each relation.

Hi Darren! Thanks for your reply.

My ultimate goal is to let my users create their own framework and display that as a table. For example

This is table is unique to each user and they can modify each cell to revise this table.

Okay, I see.
I assume from your screen shot that Inputs, Activities, etc are each of your 5 tables, and the details in the boxes below contain the values from the 5 columns that you mentioned, yes?

What I would suggest is first using a template column in each of your 5 tables to combine the values from your 5 columns. And then you can pull those templates into your summary table as a lookup via a single relation. You will need a column in each table that identifies each user (either a UserID or email address, or similar), and use that to build the relation.

Does that help?

That could work! Although I am a little confused.

If each of my 5 tables has a template column that means I now have 5 template columns sitting in each table.

Each of my table looks something like this.

Now, do you mean call out each template column in the summary table with the lookup column? :thinking:

Kinda hard to say. In that screen shot that you just posted, I don’t see any difference between the second column and the last column (the template). What is the template actually doing there?

I would have thought you would just need a single template column in each of your 5 tables that combines the values that you need from that table.

So in your summary table, you’d have 5 relations and 5 associated lookup columns. One pair for each of the other 5 tables.

Just as an aside - I would probably consider combining all 5 tables into a single table, and then add one more column that would distinguish the “type” - Inputs, Activities, etc. This may or may not make sense - it depends how similar the tables are. But it would certainly make things a lot easier to manage.

2 Likes

Hey Darren!
I just added the last template column guessing that is what you meant in the comment earlier. Anyway I only have 1 column in each of the 5 tables that I eventually want to combine in the summary table. And I’m still struggling to do that.

Using Lookup columns in the summary table to call each of the 5 columns helps but it considers all the values that column plus I’m not able to show them together in a data grid as a final result because the data grid will only consider “relation” column.

Damn! I’m so confused haha

In simple terms this is exactly what I want to achieve and I’m struggling to.

Okay, this is the first time you’ve mentioned that you want to display this data in a data grid, and have it user editable. This changes everything :wink:

If you want to do that, then you can’t use templates, because templates are read-only to an end user. You need to use the actual column values. And yes, a data grid needs to have either a multiple relation or a table as its source. So to use this in a Data Grid, what you ultimately need is to have each of your 5 topic headings represented as a column header in a single table, with the associated topic details as row/s.

I think this should be your first step. What’s stopping you with this? Do each of the 5 tables have a similar set of columns? If they do, it should be as simple as merging all existing data into a single table, and just add one column (as I described earlier).

yes, each of the 5 columns in these 5 tables are somewhat asking a question and expect a reply from the user.
that looks like this


[similarly for the 4 other questions.]

These statements are eventually being stored in their respective tables. So from the back-end point of view - it works well as it knows who answered what question for which project and so on.

The moment I try to create a new table to combine all 5 columns I get confused, because each of the statement has its own ID to work with.