3

I have added working, many-to-many relationships to a directus api through the directus admin app, but in the directus app when going to add an item to a collection, the label for the select options are not being propagated. I am able to select items and save everything correctly, so I know the many to many relationship is set up correctly, but I cannot propagate the label correctly. I have tried several different methods, including using the . notation to access fields in the relating collection, but to no avail.

When using dot notation, the relationship never loads and only shows a loading sign, while when putting nothing in label works, but no label.

Below are a couple screenshots:

This is where i put in the label

This is one of the many to many relationships

This is the loading sign that never changes when using dot notation or anything in label.

Chris Wray
  • 123
  • 7

3 Answers3

2

I don't believe you need to include the junction table (dot notation), just the field name in the related table, like this: name... and for the template, you need to use a template string, like this: {{name}}

Hope this helps! We're cleaning up the field creation process now to make this more intuitive.

RANGER
  • 1,643
  • 2
  • 17
  • 31
1

dicectus api many to many

This worked for me. Please dont confuse it with DropDown Template

Muhammad Ali
  • 341
  • 2
  • 7
0

If you want to see the name in directus 9. It's possible in the option Display Template.

enter image description here

juanitourquiza
  • 2,097
  • 1
  • 30
  • 52