[SOLVED] Linking two datatypes on the same page

Hi guys,

I have two datatypes (‘things’) - Bubble’s in-built User datatype and my own ‘Company’ datatype I’ve created. For some reason I am having trouble linking these two things. I have added two user fields of the type user in the Company datatype - one is a list and the other is just a single field. Similarly, I have also added two fields in the User datatype of type company - one is a list and the other is a single field. You can see all of this in the below screenshots.

This seems to be correct, however, when I preview the page, the app’s data does not show (it may be that I’m getting my data source wrong but I’ve honestly tried everything). Fundamentally, I would like to create a company and allow permissable users to create and invite other users under that company.

  1. User Datatype

  2. Company Datatype

It’s really hard to know where your issue is without seeing how you’re trying to use the data in the page editor. Can you share more screenshots, or a link to your editor?

2 Likes

Hi @andrewgassen,

Thank you for the speedy reply! Below I’ve attached 5 more screenshots to answer your question. The first screenshot shows the page’s data source, the second shows the groups data source and the third screenshot shows the page in preview mode. As you can see, in the preview mode the highlighted area is blank.

  1. Page Data Source

  2. Highlighted group datasource

  3. Preview. Why isn’t the app data showing? Why is this group blank?

In the Company datatype the field ‘Company Name’ is a text type as you can see in my previous two screenshots. The app data for this has been linked to the users unique id as shown in the additional fourth screenshot (I have blurred some info out for security reasons), however, I can provide you access to the account if you’d like to have a closer look.

  1. ‘Company datatype’ - app data

  2. ‘User datatype’ - app data (Please focus on the fields ‘Company’ and ‘Company List’ as highlighted. The company List was previously linked to this datatype via the Company datatype’s unique ID, I just temprarily removed it.

1 Like

When you preview, are you actually logged in as a user?

I’m always logged in when previewing pages in my application, otherwise the pages won’t display anything as I have conditions set to ensure that.

On second thoughts, I am beginning to think it’s a bug because I cannot seem to understand why it won’t load data from the app. I’ve spent days trying to figure this out. The only other option could be the way I have the app setup (seems perfectly fine to me). I honestly won’t mind providing private access to anyone who has an idea of what to do before I file a bug report.

Is your app showing data on any other pages? The only other thing I could think of is privacy settings blocking, but it would certainly seem strange to not have data loading in places. I haven’t encountered an issue like this on any of my projects.

IYes data is loading perfectly fine on all my other pages. I don’t know if it helps, but the application has currently got two users - one sub-user (who happens to be an admin) and the other user (also an admin) who created the sub-user so maybe that’s where the issue lies.

This particular page is also a heavily tabbed page so there are a few hidden groups which are shown/hidden on the basis of conditional states. Even with this though it shouldn’t be doing this should it?

[UPDATE] I’ve solved this issue. It had to do with my privacy settings. You were spot on, thank you for the suggestion!

1 Like