Help

Welcome to the Airtable Community! If you're new here, check out our Getting Started area to get the most out of your community experience.

Convert an Array (Multiple Select) into a String with formatting

Solved
Jump to Solution
113 2
cancel
Showing results for 
Search instead for 
Did you mean: 

Hi there,

I'm trying to utilize Airtable to manage Shopify Metafields (among other things), but am striking out with doing this in what I believe to be the most logical way.

I've configured a field (column) as "multiple select" with preconfigured options (the array). This ensures we're dealing with legitimate values.

Syncing to Shopify, through the use of AirPower, requires the metafields to be in the format:

["MF1","MF2","MF3"] 

I've used ARRAYJOIN to convert the array to a string in a separate field, but am stumped at actually formatting the square brackets and quotes.

Suggestions?

TIA,

Jeff

1 Solution

Accepted Solutions

Try something like:

 

'["' & 
SUBSTITUTE(
  Data,
  ', ',
  '", "'
) &
'"]'

 

Screenshot 2023-01-01 at 8.42.53 PM.png

See Solution in Thread

2 Replies 2

Try something like:

 

'["' & 
SUBSTITUTE(
  Data,
  ', ',
  '", "'
) &
'"]'

 

Screenshot 2023-01-01 at 8.42.53 PM.png

Thank you very much Adam!

This worked perfectly.