Expand my Community achievements bar.

SOLVED

Is it possible to dynamically populate segment code with data from a specific field?

Avatar

Level 1

Hello!

 

As the title questions, is it possible to dynamically populate segment code with data from a specific field? A simplified example scenario I am thinking of is if I have 3 sourceIDs and a secondary field with other data, let's say color. Is there a way to use a split or cell filtering query to select the 3 sourceIDs individually, and then update the segment code with whatever color corresponds to that record?

 

So in the end, I could have cell 1 selecting sourceID 1 and the segment code would dynamically populate as 1-Black, 1-Red, etc depending on what is in that color data field for the individual record. And then I would be able to do that for each sourceID so I could just have 1 cell per sourceID instead of having to set up a cell for each combination of sourceID and Color.

 

Thank you! 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello,

what is it you want to achieve? 

You can use the color field as a "segment code" you do not need to actually save it under segment code if you know what i mean..

 

Marcel 

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

Hello,

what is it you want to achieve? 

You can use the color field as a "segment code" you do not need to actually save it under segment code if you know what i mean..

 

Marcel 

Avatar

Level 1
Essentially, I am trying to be able to dynamically populate a segment code within a workflow activity. The segment code has more pieces than just color for reporting purposes, for example, 123-XYZ-ProgramName-Version-SourceID-Color. All other pieces of the segment code would be static except for Color. So I could split by sourceID into three result outputs, and then within each result, instead of having 1 segment code applied to all, I could have "123-XYZ-ProgramName-Version-SourceID-%%Color%%" and have as many segment codes as there happen to be colors, if that makes sense. I'm just not sure how, or if it's possible to pull in variable data into a segment code.

Avatar

Community Advisor
You can always loop over the entire temporary table and do what ever you want with your records

Avatar

Level 9

Hi @nvt2  Is this what you are looking to do? https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic-questions/how-to-parse-vars-...

 

@segmentCode is part of the workflow schema after the Cells or Split activity, so you can always use an enrichment to modify its value based on other fields in your data