Formula Kerfuffles

As Dave noted, this code will work on any comma separated array string. For clarity on what is actually being done in the formula let’s take it apart step by step.

Start with this string: [mclays, company, limited]

The arrayfilter( looks at each element in the array independently and applies a formula to each one in turn. The element of the array is represented by the import() function.

The first element import(): [mclays

Then striptoalph(import())+\: mclays\

Then the quoted( function ads quotes: “mclays\”

After the arrayfilter( processes all elements: “mclays\”,“company\”,“limited\”

Finally ad the brackets back: [“mclays\”,“company\”,“limited\”]

You can hard code the field name in the arrayfilter( or use the «» chevrons to indicate the current field. Be sure you are on the proper field before running the code if you use the chevrons. To allow you to undo the results if things go wrong ad this line before the formulfill code:

startdatabasechange “ALLRECORDS”,“Format Field”

Now if things are not what you wanted you can go back to how things were before the procedure ran by selecting “Undo Format Field” from the Edit menu. I also noticed that if the cell in a record is empty this formula will add [ and ] to the cell. We can prevent this by adding the sandwich function( to blank out the brackets when the cell is empty:

formulafill sandwich("[",arrayfilter(«»,",",|||quoted(striptoalpha(import())+"\")|||),"]")