Creating contact list for a client

I have only been working with Bubble for a couple of days, and I have absolutely no coding experience whatsoever, so please bear with me.

I have created a Client Profile page which features one client (from my list of clients). On their page there are a number of tabs, one being a list of contacts for that specific client. I have created a repeating list which contains all the contacts for all clients. How do I get it to only show the contacts for the specific client who’s page you are on?

I’m attaching a screenshot if that helps.

Hey there @abbie, welcome to bubble.

If each user can add their specific client lists by that “Add New Client” button: you should do a filter search on the repeating group just for filter that.

In that case you can use filter:Creator->Current User

https://puu.sh/yAAe8/2eb8f22aec.png

Regards :wink:

Thanks! What happens when the current user has multiple clients?

Each current user will have multiple clients and each client will have multiple contacts. (The clients will also likely be allocated to multiple users but that is probably not relevant).

What i think I need to filter is by Current Page Client but it doesn’t let me as I have set the Repeating group type of content to Client Contact and not Client. The whole page is set to Client, but to work it seems the repeating group is set to Client Contact but then won’t let me filter for Current Page Contact.

I hope that makes sense!

I’d really love some help with this. Please let me know if you need me to explain it more clearly.

Basically the I need a list of contacts which I can filter to only show contacts related to the client on the current page. I only want contacts for Client A, not Client B, C, D etc. as well.

As per image above, for client Jones, I only want contact Jamie and NEW but it is showing up all contacts which are currently connected to other clients.

Thanks in advance!

Hey Abbie,

Welcome to Bubble! Your data structure should look like this… I’m just going to have relevant fields outlined:

User
Name (text)
List of Clients (Client, list)

Client
Name (text)
List of Contacts (Contact, list)

Contact
Name (text)

You are right to have the page set to Client, and you are right to have the RG content type to Contact. So the easiest is source for the RG (provided you have the structure outlined above) is “Current Page Client’s List of Contacts”.

For workflows, remember that every time you add a new Contact, you’ll need to make a change to the Current Page Client:

Step 1: Create new Contact
Step 2: Make a change to Current Page Client > List of Contacts add result of step 1

Let me know if you have any questions.


Gaby | Coaching Bubble
Private coaching, courses, and tons of free resources

3 Likes

Thanks! I think I am going to have to get my head better around my data structure. I appreciate your suggestions! Will see how I go :slight_smile:

Thanks Romanmg. So I have set up my data above as I understand it. This is what I have done:

I have included ‘List of Clients (Client, list)’ under my User database.
I have included ‘List of Contacts (Contact, list)’ under my Client database.

I have set the page to Client.
I have set the RG to Contact.
I have then put the source for the RG as ‘Current Page Client’s List of Contacts’. All seems ok ie. its blue.

However, when I go to preview the page, there is nothing in the RG.

If i have the RG source set as ‘Search for Client Contacts’ it delivers a list of all contacts.

The problem still is that I can’t get it to list only the contacts for this client.

I am either (a) still doing something wrong above or (b) I haven’t got my ‘Add New Contact’ form set up correctly so that it allocates the New Contact to the correct Client. So I need to link the Contact in the ‘Client Contacts’ database with the correct Client in the ‘Client’ database. I will continue investigating but if you can point me in the right direction that would be amazing. I just can’t seem to find any tutorials or videos anywhere to step me through this.

Thank you!

Hey Abbie, you’re very close! The setup sounds correct. I think your missing link is in that Add Contact workflow.

Not sure if Add means Create or if you’re selecting from elan existing list of Contacts, but let’s say it means Create.

  1. Create Contact
  2. Make a change to Client (identify the client): List of Contacts add result of step 1

Feel free to share your editor if you still need help and I can take a look. Basically you need to update the client’s list of contacts field by “adding” the contact to it. That’s the list the RG is set up to display.

Identifying the client just depends on what’s available on the page with the Add button. If it’s on this same page set to Client, then you can make a change to Current Page Client. If not, then you can Do a Search.

Let me know if this helps…

2 Likes

Ok that makes a lot of sense. Thank you! I will try and and if I don’t have any luck I will share my link. I really appreciate your help. I’m loving using Bubble and am determined to get my head around it :grinning:

2 Likes

This topic was automatically closed after 70 days. New replies are no longer allowed.