How to Import Records with Record Selector Fields Populated?

I have a module, with 2 fields looking up to 2 different modules with the ‘Record Selector’ field. I want to import data, along with data populated for those ‘Record Selector’ fields but I am unable to see those fields either when I am trying to export data not while importing data.

Attached are some screenshots for reference. I can either prepare my csv file with record id’s from Corteza as attached or with said record names, but the fields itself don’t show up in the list.

I’m looking for something similar… any ideas?

@tjerman @darh Any insights?

You’ll need to use the CLI; see here https://github.com/cortezaproject/corteza-docs/blob/2021.9.x/src/modules/devops-guide/pages/cli/record-import.adoc

So, I thought let me play around with the yaml and csv files, but was having a little hard time with running the command as mentioned. Attached are some attempts in my Ubuntu CLI. Also the import CLI link on Github is broken.


@tjerman
FYI @munawir

Are there any news on this topic?

I am also missing the possibility to export record selector field with the name instead of the Id. The user cannot edit the data in Excel or somewhere else based on the Id, right?

Regards,
Tobias

my issue was something else but for your use case, I think you can get by creating some sort of a formula field on that module that reads the name of the record through record selector field and choose that in your export.

Is this still not doable in latest Corteza? Seems like an important feature to be able to import record selector fields. It was possible at some point using an id field to map but I recall that stopped working after a particular version. I’ve tried some attempts on latest version using 2 steps in order to update existing via recordIDs but it is not working. Should it be? Would the rest API be the easiest way to do this if it’s not possible with the import tool?

I was able to do this, but through postgres. I have access to my database through that which was definitely easier for me to do compared to CLI or API route.