Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to save the term slug as the related join field? #4

Open
smokeyfro opened this issue Jan 17, 2023 · 1 comment
Open

Comments

@smokeyfro
Copy link

Hi Dimitrov (or is it Adrian?),

I'm trying to import 200 records from a google sheet, but the tags fields I'm trying to import is saved as a comma separated list of slugs, where as the tags field export output is an array of related tag id's. Is there anyway to use the slug instead of the id?

TIA
Chris

@dimitrov-adrian
Copy link
Owner

Hi Chris,

Unfortunately no, because the import UI in Directus do the data processing in API level and do not involve any UI logic, and as the UI is just an app and the m2m-interface is just an extension to this app it only enhance the UI.

Anyway, as a dirty solution would be if your tags collection have as ID (primary key) the slug. Then you could easily import the tags without duplicates (exported from your spreadsheet too). Then as having already tags, importing the records will be straight forward, just need to alter the csv file to ensure the list is "['tag1','tag2']" and not "tag1,tag2"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants