Multiple Entries separated out in Repeating Group

I’m losing my mind. Nothing I can find actually helps my situation and I’ve manipulated my database seven ways from Sunday trying to get the result I want. Here’s the seemingly simple thing I’m trying to accomplish.

Data Type A is owned by multiple Users delineated by email in a multiple entries list.

I want to create a repeating group, one row, two text boxes, one button.

Text Box One - Data Type A Name
Text Box Two - Owned by Email-1
(Right now I can get either Email 1 only or Email 1, 2, 3, etc… in the same text box)
Button - (I got this part)

Basically
Type A | Email 1, 2, 3 | Button or Type A | Email 1 | Button

But I want

Type A | Email 1 | Button
Type A | Email 2 | Button
Type A | Email 3 | Button

Does that make any sense to anyone? First app build on Bubble, and I’m just stuck on this one.

Thanks!

~James

I’m not 100% sure I follow, but from the sounds of it you’re trying to display a list (of emails) inside a single repeating group cell?..

In that case there are two options…

  1. use another repeating group inside the cell of the first one, with a datatype of ‘email’ and a data source of ‘current cell’s Datatype A’s list of emails’.

  2. Use the ‘format as text’ expression to display the list of emails belonging to the current cell’s datatype A. Again, use the current cells list of emails, then format them as a text list.

That’s what the program is doing, which is not what I want. I’m sorry, I don’t know how to explain this in Bubble terms, so I can imagine trying to help is frustrating. I appreciate the time.

I have a repeating group that is trying to pull entries from a data type. Entry A has a specific ID, that ID can then be assigned to multiple users. There is also Entry B, Entry C, Entry D, etc… all able to be assigned to multiple users. So, Entry A has a multiple entries list associated with it called Owned By.

Entry A is owned by Email 1, 2, 3, 4, etc…
Entry B is owned by Email 1, 3, 5, etc… so an email can own multiple entries.

In the repeating group I’m creating I want show:
Entry A | Email 1 in the first Row of the Repeating Group
Entry A | Email 2 in the second Row
Entry B | Email 1 in the third
Entry B | Email 2 in the fourth,
,and so on.

Thanks again for trying to help. I appreciate it.

Ok I see - you want to show a separate row in the repeating group for each Datatype Entry AND each user.

That’s actually quite tricky, as it effectively means having a repeating group that shows 2 different datatypes (which is not something you can do in Bubble).

However, having played around with it for a while now, I’ve managed to find 2 ways to achieve what you’re trying to do.

The first (and probably simplest) way is to create a 3rd datatype, that connects Datatype A to the User, with one entry for each connection.

Then simply set your repeating group to that datatype, then in each cell you can display the Datatype A entry AND the connected User email address.

The second way (which is a little fiddly, but it works fine) is to do another search for Datatype A’s User’s in your ‘email’ text box, in order to match the correct email with the correct Datatype A entry in each cell.

The way to do it is as follows:

  1. You need to make sure you have a 2-way many-to-many relationship set up in your database structure (i.e. Datatype A has a field for list of users, and User has a field for list of Datatype As).

  2. Your repeating group should have a content type of ‘Datatype A’ and the data source needs to be a ‘search for Users’ (with a constraint to only return users who’s list of Datatype As isn’t empty): 's Datatype As: sorted (however you want the list to be sorted).

That will return a list of ALL the datatype As that are owned by users, including duplicate entries (so if 3 people own entry C, entry C will appear 3 times).

  1. In the cell, add a text box to display the current cell’s Entry (i.e. current cell’s entry’s name).

  2. For the email text box you need to do a search for Datatype As (with a constraint to only return entries who’s list of owners isn’t empty): sorted exactly the same way as your repeating group data source Datatype As (it’s very important the the sorting is the same, otherwise the emails wont be correctly matched with the entries); list of owners: item# current cell’s index: 's email.

That will return a list of all the User’s who own datatype As (including duplicates), in the same order as the original list (the RG datasource), so by using current cells index to select the item number, it will display the correct email address in the correct cell.

As I said it’s a bit fiddly, but I’ve checked it and it does work. There may be other ways to arrive at the same end - personally I’d probably use the first option (a third ‘connecting’ datatype) as it keeps things simpler but it all depends on your use-case and your app.

Option one was definitely the right work around! Thank you!! Been kicking my tail for two days trying to get option two to work and to absolutely no avail.

I appreciate your time and effort. Thank you again, truly!

~James

1 Like