I need to fill a repeating group with the results from a query on two “things”.
(Please see image below for clarification)
Find Jim in Users
Get the id’s of the groups he belongs to
Search “Chat Group” for those id’s
Return members (User type) who are not Jim
Display this User info in the repeating group
-group_tags a list of texts? It should be a list of Chat groups
-members a list of texts? it should be a list of Users
Just checking first you have it set up the “Bubble way”
Primary keys / foreign keys don’t exist in Bubble really. Well, behind the scenes they obviously do, but Bubble treats it differently (and I think they do it quite well).
You rarely need to use ‘ids’ in Bubble. The primary key of a Thing is it’s unique ID. But you don’t save that unique ID to a different thing to connect it, you just save the actual Thing. Yes, it sounds weird if you’re familiar with other DB structures.
Let’s suppose you have data as follows:
On the Product…
Yes, Group tags is a list of texts
Members is a list of Users though. ( I redid that part earlier after having a problem with texts. I apparently didn’t learn my lesson though since I didn’t do it for group_tabs)
MySQL seems easier to me but I’m sure it’s just a lack of understanding on my part…
I will read your link and try again.
Thank you Tyler
Yea its different than normal databases where you store the id, but worth fixing it here.
Once you get the Chat groups list field set up, and assuming Jim is the Current user:
Current user's group_tags:each item's Members:minus item Current User
Will return all Users (except for himself) in each group that Jim is in
And make sure Privacy rules doesn’t limit the results, there could be a rule put in place right now that doesn’t let Jim see other Users
You make it look easy.