Automate relationship between tables based on field ids

I am in the process of exporting data from Airtable to Backendless from various tables with Integromat (works fine).

All good for importing the AT data into Backendless columns. However, with this process I only have a set of ids (string field) in columns that provides a kind of “relationship” between columns….

Do you have any tips on how, after the data is sync, we can automate & link these relationships between tables in Backendless?

Hello @tim_khan,

you can create data structure in backebdless console, add some data and made export, so you will able to see how to add data.

thanks for the reply @sergey.kuk

I guess what i am trying to ahchieve is to Set/Add Relation with objects in bulk, with a condition

i.e.
Table: Product
columns: objectID, airtable_product_id, product_name, order_relation

Table: Order
columns: objectID, airtable_product_id, quantity, product_relation

I know that I can do a PUSH call to create a relation from the child product ID to the parent order ID. What I am trying to achieve is to automate that process, relating any objects from the order table to product table with the same airtable_product_id

Hello @tim_khan

If you import this one using an API, we can suggest that you create an EventHandler afterCreate in the business logic section. For the handler, you can add logic that would add the necessary relations.

Regards,
Inna

thanks for the reply @Inna_Shkolnaya

It’s a good idea, I have tried to implement that solution over the weekend, but am struggling a little…

Do you have any tips / tutorial links on how to execute these kinds of relations in EventHandler? once some data has been imported to Backendless tables (with Integromat HTTP Post method)

correction on my previous post:

Table: Order
columns: objectID, airtable_order_id, quantity, product_relation

Hi Tim,

Are you going to use JS, Java or Codeless in your event handler?

Regards,
Mark

Hi @mark-piller

Thanks for your reply. Will be using Codeless,

Hi Tim,

There are blocks in codeless that let you add/update/delete relations between objects:

Hope this helps.

Regards,
Mark

1 Like

Hi @mark-piller , thanks for the tip. Getting there :slight_smile: In my case, importing a batch of data once a week with Integromat, what would be your recommendation on the trigger I should use to call this event handler?

Do you understand how event handlers work in Backendless? Keep in mind that event handlers are not called directly. They are invoked as a part of the API invocation you’d be calling from integromat.