Score:0

Filter or sort Multivalue Field of referenced Media items to their boolean field

in flag

I have a list of users who can add audios to their profiles via an multi-value entity reference field. The media/audio has an additional Boolean field to check if it's a primary or normal audio.

In a view, I list the users (coming of an Search API index) and show 5 audios per user. It should show the primary audios first.

It is easy to accomplish with the Views Field View module. View 1: contextual filter on user ID and Filter, or sort to the primary marked audios; insert View 1 in the user listing view including the argument of View 1. It is a massive performance killer and simply not acceptable speed-wise with the amount of users in my case.

How could I filter or sort the multi-value audio field to show the primary audios first?

Adding an additional audio reference field where the user references only primary audios would work, if the Views Conditional module would render the audio and the script tag, but it doesn't. Otherwise I would have checked with a view conditional field whether primary audios are present and show them or the non primary ones.

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.