What does this mean, and how to I find a solution?

This is a message I’ve seen before, but I don’t know how to work around this that will help me get to a solution.

I’m struggling to get my head around connecting or linking two tables together. I want to achieve this so I can pull data from two or more tables via RGs and send, or display data from each table in text editors etc.

I’ve tried to do this already using ‘display data’ in a workflow and because the data types aren’t consistent I get the error shown here.

How do I use relationship between tables so that I can pull data from one or the other and thus display data in a text editor contained in a group, as I’m trying to achieve here?

Is the data always text?

You could change the data type to ‘text’ and try that :slight_smile:

An element can only have 1 data type but multiple sources.

The other way to do it is if you have some relation set up in the database, then you can set it to be parent type and drill down to the child type.

1 Like

Thanks

I think the database relationship is what I’m ultimately after as I’ll probably need to do this again for another feature.

To connect two database together, I’ll call one Table A and Table B. I went to Table A and created a new field called ‘Database Link to Table B’ then set Table as the the field type.

Is this the correct method?

Then I’m assuming I’ll go and create a RG, and make the RG type of content ‘Table A’, then the datasource as ‘Search Table A’s Database Link to Table B’.

But when I got this a similar pop-up appears as above saying that the RGs content is Table A, the data I’m setting up now is type Table B, and wants me to change the type of content to Table B.

Then change your search constraints so it finds all the Table A’s linked to the Table B’s you want to display.

Then display the table B data in a text element or whatever way you want to display it.

So that’s what my plan was - to search the ‘Database Link to Table B’ field I had created, but as soon as I do that, Bubble recognises that this field’s type isn’t consistent with the same type of content, and then that pop-up re-appears asking me to change the data type to Table B.

I may have to explore using custom states

If you are talking about your RG data source - you would need to have type of content as table A and then search for Table A’s only…but use whatever the relevant search constraint is to bring up the Table A’s that have the right Link to Table B. If you need to, under your conditionals tab you can change the search constraints for what list of Table A’s you bring back.

Then in your RG place a text element and this is where you will call up the Table B text by using ‘current cell’s link to table B’s text’ in the content field. Similarly under the conditionals tab in this text element you can change what text it displays based on different conditions if you need to.

Thanks, I will give this a go.

But what’s the right way to link between the two tables. Is it how I described in my earlier post? (I’m assuming that if this link is wrong, then it won’t work correctly, and may lead me to incorrectly believe that the implementation of the expression may be incorrect when its probably to do with the database linking).

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