Importing csv with multiple relationships

I’m trying to import a users csv where

  • “users” have multiple “subjects”
  • “subjects” have multiple users

name: “Michael”
subjects: [“English”, “Maths”]
name: “Steve”
subjects: [“Science”, “Maths”]

{ name: “Maths”,
users: [“Michael”, “Steve”]
{ name: “Science”,
users: [“Steve”]
{ name: “English”
users: [“Michael”]

  • I’ve tested and made sure all subject names(primary fields) are pre-populated in the subjects collections, exactly as is.
  • I am using commas “,” as separators for my “subjects” field in my users collection
  • I’ve explored a few of the hacks I’ve found on the forum ( timer trick, embedding dropdown of subjects and filtering with text input ) but have experienced little success.
  • I’ve also tried, with and without spaces after comma eg. “English,Maths” “English, Maths”

Has anyone come across a good solution to this? Is there something I’m missing?

1 Like

Hi @mickeycao ,

The way I did, not sure still valid.

Have a unique id in every collection that need importing
In the child collection, have an id of its parent
Then after all the import, construct using filter to those ids, using nested custom list with countdown inside it.

Thank you so much for your reply Yonki,
I’m not sure I understand, and please excuse my ignorance.

You mean have an additional column with a pre-populated number? I believe Adalo already has hidden ID’s and I feel like adding a synthetic ID would have the same function as just using a unique name right?

I’m not sure how this works with many-to-many relationships?
I would need to slap many “parents” to my child collections

For me, the nested custom list shows only items with a single relationship, but does not show any of the ones with multiple relationships. Screenshots below:

Thanks in advance,

@Colin am I missing something?

I’m guessing this feature just isn’t available yet…?

If you are sure, you have unique name property, you can use that, but for me I am not brave enough to use text as unique id.

This unique id is different from hidden Adalo’s record id.

I am not sure either for many-to-many, I have just done this in 1-to-many.

You might want to generate additional temporary collection that mimic many-to-many.

Simple experimenting is the best choice, increase the complexity until you hit your goal.

Yah dude, tried this just now, and it wouldn’t export the relationship data.
Nor could it import csv and match the relationship column in the Adalo table.
:frowning: might just have to wait.

You need to construct the relationship after importing, because import only works on plain records.

Yeah, looks that way until further notice.