I have a data type Conversation and another data type Message. Conversation has a field List of Messages.
I have a repeating group Current User’s Conversations that is filtered based on an input element, but if the user enters the word “snow” in that input element, the repeating group filter doesn’t work because that word is in the Message data, not the Conversation data.
What to do?
Thanks!
I would set it up the other way round: make a message have a field for the conversation it belongs to.
That way in your repeating group you can do a search for current user’s conversations or conversations where members contains current user (depends on your database setup)
And then I’d intersect that with a search for messages where the content contains searchbox’s value and then display those message’s conversations
I’d also after that say unique elements so that if snow was in more than 1 message in that conversation then it won’t display the same conversation more than once.
2 Likes