How to build comma separated values calculated fields to map to AEM tags | Community
Skip to main content
May 28, 2024
Solved

How to build comma separated values calculated fields to map to AEM tags

  • May 28, 2024
  • 2 replies
  • 557 views

Hi, 

 

We are in the process of building comma separated values calculated fields to map to AEM tags. Currently there are multiple fields from Workfront that need to be mapped to one AEM Tags. 

 

In Workfront we have multiple fields for Audience, Channel & Social Identity but in AEM, those values are combined in tags. Based on this post, we will need to create a calculated field to combine the multiple fields in WF and to be able to separate those by commas: https://experienceleague.adobe.com/en/docs/workfront/using/administration-and-setup/configure-integrations/configure-aacs-integration

 

This is how we build our calculated field: 

CONCAT({DE:AudienceType},", ",{DE:Audience - Engineer},", ",{DE:ChannelType},", ",{DE:ChannelType - Adv},", ",{DE:ChannelType - Digi},", ",{DE:ChannelType - Digi - Mobile},", ",{DE:ChannelType - Event})

Each of the fields we have above are multi-select dropdown fields. I am using the expression ,", ", between each fields to separate them by a comma and also a space. 
 
After multiple tests, we found out that there is no issue faced if all options are selected. However, when not all options are selected, there will be commas and spaces in between the values for each fields that were not selected in the form. Here's an example of how the result of the calculated field looks like: 
 

consumer, engineer, digital-advertising, , , , sms, email, event, , , ,

Please note that the above is only an example and I am not able to disclose our values due to data privacy. I believe the commas and spaces in between or at the end of the values are causing the whole data selected not to be mapped from WF to AEM. 
 
I am sure that there is a way to correctly do this as the Workfront experience league article itself has advised us to use calculated fields. I am not sure how can I change my expression. 
 
Is there anyone that has successfully mapped WF fields to AEM that can help us in building this? Any help is greatly appreciated. Thanks!
Best answer by KellieGardner

I'm thinking you would need to take it a step further and use an ISBLANK expression to not include the other fields if they aren't required and can be left blank.

 

 

Example:

valueexpression=CONCAT(IF(ISBLANK({DE:AudienceType}),"",CONCAT({DE:AudienceType})),IF(ISBLANK({DE:Audience - Engineer}),"",CONCAT(" , ",{DE:Audience - Engineer}))

 

 

 

 

 

2 replies

KellieGardner
Community Advisor
KellieGardnerCommunity AdvisorAccepted solution
Community Advisor
May 27, 2025

I'm thinking you would need to take it a step further and use an ISBLANK expression to not include the other fields if they aren't required and can be left blank.

 

 

Example:

valueexpression=CONCAT(IF(ISBLANK({DE:AudienceType}),"",CONCAT({DE:AudienceType})),IF(ISBLANK({DE:Audience - Engineer}),"",CONCAT(" , ",{DE:Audience - Engineer}))

 

 

 

 

 

kautuk_sahni
Community Manager
Community Manager
July 29, 2025

@artiebertie Just checking in — were you able to resolve your issue?
We’d love to hear how things worked out. If the suggestions above helped, marking a response as correct can guide others with similar questions. And if you found another solution, feel free to share it — your insights could really benefit the community. Thanks again for being part of the conversation!

Kautuk Sahni