I am pretty new to Bubble. I have been using RGs and thought I got a handle on it all. The last 2 days I have been trying to connect 1 database to another, but I have noticed that the parent group is not passing information into do search.
For example I have database A and Database B. That both have the same content within them are the same field type, but have different names.
I now have a repeating group , where I want to link Database A and Database B, as I want to show the name of the individual that has left a message connecting the 2 databases together using the user-id. and that information is in DB A, But what I am finding is when I do a search the information is simply not passing through but it does when the parent group is outside the search for function.
The RG is sourcing Database A, and within the RG I have a text field that does a search for Database B
For example
Do a search for Database B (constraint where user-id= parent group Database A User-checker-id )
What I am finding is this. The parent group within the search does not pass any info through it.
But If I simply say Parent group Database A User-checker-id the information is passing through.
I know this as I changed my search from Do a search for Database A: first item: Name to Do a search for Database A: count > 0 and I am getting back a No but I am getting the id when I just pass the Parent group Database A User-checker-id the information is passing through.
I think your second screenshot is a duplicate of the first.
You might want to use a relationship field in data type 2. It’ll be much more efficient and use less workload units because you wouldn’t need to run a search in every RG cell.
Also note that every record has a built-in creator field (type: User) that Bubble sets automatically to whichever User created the record. Not saying you don’t need a custom User field because there are plenty of reasons for it, but just letting you know in case you’re just looking to save the creator… Bubble already does that.
Why can’t your text expression be “Parent group’s Connection’s User-Name?” if the RG is a list of Connections and you’re looking to show the user-name in that Connection record?
@romanmg Thank you. Your’e right I didn’t realise I uploaded the same image.
WhN. you say relationship field do you mean a field that connects the 2 tables together like an ID. Or like a field in the DB that references another table still within the DB.
The latter. The field’s type would be User and not text. That kind of field creates a link between to DB records. Let’s say the field is called “Related User” within a data type called “Mesasge”… You’d be able to write expressions like “Parent group’s Message’s Related User’s Name” and avoid a search.
I tried this to begin with, but what I found was every time I tried to insert into the DB field such as when saying create a new thing ID = Current user id, it came up with a error
When the field’s type is User, then the expression to save a value should also evaluate to a User. If you had “current user id,” then that’s a text. Not a User. Replace that with just “current user” and you’ll see it’s compatible.