T
Twenty7mo ago
Rob

Converting text fields to links

Hi Twenty Team, I am loving the new links fields!!! I'd love to convert some of my existing text fields to link fields, is this possible? I have tried to do it via the webui, but can't see a way to change the type. Is there a command I can run via cli to change a field type? Or would you recommend I write a REST API script that does something like... 1. Via webui, change the name of the text field to indicate it's being decommisoned. E.g.change crunchbase to cruunchbase_text This didn't work, renaming fields seems to be a bad idea. 2. Via webui, create a new link field with the correct name. E.g. create a field called crunchbase 3. Via a script, get each company with a non empty crunchbase field, copy that text to a temporary location scratch1 field, and empty the crunchbase field 4. manually delete the crunchbase field via the web ui. Create a new crunchbase field that is of type links 5. Via a script, get each company with a non empty scratch1 field, copy that text to the new crunchbase field, and empty the scratch1 field Loving the new features!! Thanks for your help in this transition
4 Replies
Rob
RobOP7mo ago
And a related follow up question, is the "Domain Name" field special? Or can I create a new domain name field that is a link type?
Rob
RobOP7mo ago
I ended up writing the following python script to move data across, sharing here incase it helps anyone else. I haven't touched the domain field, will wait until i hear it is safe 🙂
charles
charles7mo ago
That's it! We haven't migrated the company domain yet but it's on our roadmap in the short term! when we do, we will make a migration command to map it to the new Links type
Rob
RobOP7mo ago
Awesome. Thanks @charles
Want results from more Discord servers?
Add your server