Multiple Email contexts

I have 3 email contexts and I select it in Control script based on the data below

var emailTemplate = record.fields.WEmailTemplate;
let sections = .slice.call(merge.template.contexts.HTML_EMAIL.sections);

// turn on sections that match the list
sections.forEach(function(section) {
if (emailTemplate == section.name) {
merge.template.contexts.HTML_EMAIL.sections[section.name].enabled = true;
} else {
merge.template.contexts.HTML_EMAIL.sections[section.name].enabled = false;
}
});

In Designer, I was able to send test email only from the first template (set as Default) but the rest are not successful. Do I missed something on this control script?

Hi Rommiei,

script is ok, functional in design, workflow does not support it, sorry to say so but this is a known issue within OL (reported october 28 2019), possible fix in release 2020.1.

sorry to inform you.

This functionality is indeed available in the upcoming 2020.1 release.

The script expects the name of the email section to be available in the WEmailTemplate field. Have you checked the values that you extracted?

Hi - this is no longer an issue. I was able to get it resolved. It ended up being and issue in the ‘Create Email Content’ plugin.

Thank you

Could you share how the issue was resolved? It would be helpful for other members of the community who happen to run into the same problem.