Filtering a repeating group using fields in two databases

Hi, Nice to meet u^^ i am now developing chatting app.

The database structure in Bubble’s no-code tool is defined as follows:

User

  • Name, Text
  • Contact, List of User

Chat

  • Chat-User, List of User

In the page of chatting list, RepeatingGroup display current user’s contact(list of users), but i want to list only contact which has not chatting room between current user and contact.

Suppose users A, B, and C have been created. If a chat room is created, the Chat-User field in the Chat data type contains values.

The expression for the RepeatingGroup’s data source to achieve this, Each Current User’s Contacts, RepeatingGroup is excluding cases where Chat-User matches the Current User and Current User’s Contacts

Plz tell me about RepeatingGroup Data source expression.

Thanks

Do a Search for the Users Contact List and then use the :filtered operator and the advanced constraint to structure the constraint that the Users Contact List is not in the Do a search for Chats each items List of Users.

1 Like

Thanks your comment^^
I solved by below criteria(from your idea also). but i did’t fully understand

Current User’s Contact:minus list Search for Chats(Type:Chat Constraint:Chat-users contains Current User):each item’s Chat-users

Chatting Room is one for A,B

logined by A ( A has contacts B,C)

image

logined by C ( C has contacts A,B)

image

1 Like