Help

Formating a String to an Array

Topic Labels: Automations
Solved
Jump to Solution
3198 5
cancel
Showing results for 
Search instead for 
Did you mean: 
Mathiass
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi all, I’m stuck at this, probably somebody can help me out:

I receive in Airtable a string of URLs like this:
url1,url2,url3,url4

Now I would like to split this string and create in Airtable (in a separate table) single records:
Record 1: url1
Record 2: url2
Record 3: url3
Record 4: url4

How do I set this up?

I would really appreciate!

Thank you! M

1 Solution

Accepted Solutions

I decided to make a video showing one way of writing a script that does this.

Note that the script in my video will not run as an automation script. However, if enough people view, like, and comment on the video, I will probably make a follow-up video that shows how to convert the script to run as an automation.

See Solution in Thread

5 Replies 5
Matt_Kennedy1
6 - Interface Innovator
6 - Interface Innovator

Do you need to do it once? Or automatically?

To do it once with not a very large set of data, you can export to CSV.
In Excel and use “Text to Columns” to split the data into columns at the commas
Select each row, copy, paste special, transpose.
Save and re-import.

Other than that, you’d probably need a script I think.

Hey @Matt_Kennedy1
Thank you for your answer!

It is intended to happen automatically, so I a need a script that automates this.
If someone could write me this, I do some leaps of joy.^^

I made this video showing a non-scripting method for creating multiple linked records from a single text field.

You could use the same technique for your list of urls, except instead of splitting out the urls based on the new line character, you would need to split them out based on the comma.

On the other hand, a custom script would be much faster, require fewer fields, and take fewer automation runs.

If you are interested in learning scripting, this would be a good beginner project.

I decided to make a video showing one way of writing a script that does this.

Note that the script in my video will not run as an automation script. However, if enough people view, like, and comment on the video, I will probably make a follow-up video that shows how to convert the script to run as an automation.

Mathiass
5 - Automation Enthusiast
5 - Automation Enthusiast

Big thank you kuovonne, this helps me a lot. Will try to customize this as my first learn-coding project. :grinning: