Patching together fields based on multi-select

Howdy all – In an attempt to assist our email marketeers, I have a table with two columns, code & section.
Any given email may have a combination of these sections, and I’d like the ability to select a number of sections using maybe a multi-select menu, and have code displayed for the relevant sections allowing us to copy and paste this template as a whole into mailchimp.

Stuck on best way to achieve this – a bit beyond my scripting skills!

Many thanks for any assistance

Hey @Tim_Kalic

hope I got right what you need with this quick solution. There might be others as well.

Make a table with your two columns Code & Sections. This is your template database and you can fill it with all the code & sections you want to use as buidling blocks. Make sure “Sections” is your primary key (the one with the flag icon).

Screenshot (click to expand)

09

Now make a new table, again with two columns, one two pick the section, the other one to automatically load the code.
Make “Choose section” a ‘Table Lookup’ column from the template database (without multiple select).
In the second column, I named it “result”, enter this formula:

EDIT:

=[Choose Section].Code 
Screenshot

09

Now you can patch together your code. Just choose one section per row and the code will appear. You can than copy the whole column and paste it into mailchimp.

Screenshot

39

Notice: it will also copy the column title (“Result”), so you have to remove it after pasting it in. Haven’t found a solution without that

1 Like

@Daniel_Stieber worked perfectly, your help is much appreciated :pray:
I was trying to do the builder outside of a table and going around in circles!

2 Likes

@tim_kalic I just realized, that I made it very complicated for no reason here :sweat_smile:

As you can see here Lookup from other table it should be working with just

=thisRow.[Choose Section].Code 

instead of

=Templates.Filter(Sections=totext(thisRow.[Choose Section])).Code

in the Result column.

That indeed works too, thank you!

1 Like

:smiley: looks like you dont even need the this Row.

So shortest possible formula is just

=[Choose Section].Code

This is great – so it finds and references the section field without it being explicitly stated?

In a column (result) you can reference another column of the same table (Choose section). It will automatically loads the value of this column, that is set in the same row. So “thisRow” is not necessary.

So we could use =[Choose Section]to get the selection you made in the same row.

Because our column “Choose section” is a table lookup, it loads the whole selected row of our template table (not only the title!).

That means we get the desired column with just adding it with a dot operator: =[Choose Section].Code