Return Current User Data In A Repeating Group

Hi everyone,

Apologies if this is very simple. I’m new to Bubble and finding my way. I’ve tried a number of things to solve this but am having no luck.

I’m building a service which sends SMSs. I want to send a message using a Twilio plug in, then return recently sent messages from that particular user in a repeating group.

I can return recently sent messages with “Current cell’s Message’s Creation Date”, but that doesn’t filter by users.

I can filter by users by doing a search for Messages and then adding a constraint “Created by = Current User,” but then that populates the entire column with that one message.

So I can’t seem to combine the two. Thanks in advance for your help :slight_smile:

Hi there, @timbretonjohnston… can you post a screenshot of the setup of your repeating group? It should be as simple as the data source of the repeating group being Search for Messages, and the constraint on the search would be Created By = Current User, but it sounds like you tried that and it’s not working for you. So, screenshots of the search/constraint and the repeating group’s fields would probably be useful to help pinpoint the issue.

Best…
Mike

Hi Mike,

Thanks kindly for your help, it’s greatly appreciated.

You can see in the last column I have what I had previously. The problem with this logic is it returns every message sent on the platform, not those just by the current users.

If I include the Created By = Current User constraint, the repeating group ends up like this, with the same one message populated throughout the whole repeating group.

It looks like I need some combination of the two, which I can’t figure out.

Thanks, Tim

No problem at all, Tim… it’s my pleasure to try to help.

You are showing the setup of a particular field in the repeating group, and it looks like the setup you are showing should be the setup of the repeating group itself. In other words, you shouldn’t have to do those searches in the fields of the repeating group.

If you set up the repeating group’s data source as Search for Messages with a constraint of Created By = Current User, then the first field in the repeating group would be Current cell's Message's Creation Date, and the second field would be Current cell's Message's customer_first_name.

Want to give that a shot and see if you get the desired result?

Best…
Mike

Thanks Mike! That makes total sense. I clearly missed setting the data source for the repeating group. I’m now very close.

Unfortunately it’s still returning all messages sent, not those by the current user.

I’m not sure what the “:first item” is. Bubble prompts me saying “The data your displaying is a list of messages, while it should be a single message.” Not sure what’s going on there? I tried a number of other options from the dropdown box but none give the desired result.

Hmm… is that a repeating group inside of a repeating group? What is the setup of the group that is underneath the Message History heading?

Wizadry! Thanks Mike, all fixed!

Yes it was. Sorry I should have checked this. I set the settings for the outside group, but it should have been for the group under “Message History”, as you pointed out.

It’s all so easy once you understand it :slight_smile:

Thank you very much for your help!

1 Like