Why my external collection is not being considered as a current internal collection?

Hello everyone, I’ve been trying to develop a ecommerce app but I’m having problems in the checkout… I’m using google sheets with sheetdb.io to import my products attributes but I can’t create a relationship with adalo databases (e.g. order item db (internal) with menu item db (external collection)). The platform does not show me the option to do so and I’ve been stuck in this for about 2 hours, I need help! thanks in advance!

Hi @diefigueroa,

Welcome to the forum!
Unfortunately it’s not possible to create relationships with External Collections, you have to do it manually. Sorry :frowning:

Best regards, Victor.

1 Like

how to do this manually?

Hi @jribeiro,

That depends on the backend database you’re using as an external collection.

General approach is that you have some column in the collection (table), which stores the relationship to another collection (table). In database terminology it is called “foreign key”.

So for example, you have “Items” table and “Images” table, one item can have many images. In “Items” table you have an “ID” column. So in “Images” table you need to add a column (foreign key), which refers to this “ID” column in “Items” table.

As a result, you can have several records in “Images” table, which refer to a single record in “Items” table.

And after that, you can display these records of Images using some query filter parameter in the external collection API call.

Just in case: using external collections and relationships require some technical knowledge. If you’re not comfortable with it, I’d recommend using built-in Adalo database.

Best regards, Victor.

1 Like