Score:1

List all groups of a user in one row as a multi-field

pk flag

I want to list all the users and groups they are member of in one table, one row per user.

I have a simple view that lists all users in the system. I added relation to group content membership and a "Parent group" field to the view.

I tried aggregation, but no luck.

Lets say we have 3 users (user1, user2 and, user3) and 3 groups (Interest1, Interest2, and Interest3). user1 is not a member of any group; user2 is member of Interest1; user3 is member of Interest1 and Interest2.

What I want to see is the following.

Users Interests
user1
user2 Interest1
user3 Interest1, Interest2

What I get is instead this.

Users Interests
user1
user2 Interest1
user3 Interest1
user3 Interest2

I also don't see multiple configuration ("Multiple field settings") or something similar in the group field settings.

Jaypan avatar
de flag
You need to aggregate the group field.
carlo avatar
pk flag
Hello, I already tried it. But that did not work. It still showed the two rows when I activated the aggregate function.
carlo avatar
pk flag
for now I solved using views_field_view with contextual filter
mx flag
You need to clarify how the users are related to groups, what types of references are they, are users connected to groups directly, or indirectly through group content, what is a parent group, what field did you set the Aggregation to which option?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.