Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Getting the label of a split subset per delivery in data extraction

Avatar

Avatar
Validate 1
Level 1
brianp76764507
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
brianp76764507
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
brianp76764507
Level 1

03-06-2020

Hi everyone,

I'm working on an automated report and one of the fields I'm trying to pull is the label of the split subset the delivery is attached to. This is what I have right now in the Data Extraction activity: 

image.png

In the picture below for example, I would be trying to get the values 'Engaged' and 'LowEngaged' for Delivery 1 and Delivery 2.

image.png
The expression above that I'm currently using just returns the label of first subset for every delivery. I've tested this on other campaigns with more than 2 subsets and they all just return the same label.


What I'm getting:

Delivery LabelSubset Label
Delivery Template 1Engaged
Delivery Template 2Engaged

What I want to get:

Delivery LabelSubset Label
Delivery Template 1Engaged
Delivery Template 2LowEngaged

Is there an expression I can use to achieve this or is this going to require a JS solution? Any help is appreciated.

Bonus Question:

Can this technique be applied to cases where there's more than 1 split?

image.png

In this case is there a way to return something like:

  • "Engaged, Travel2"
  • "Engaged, Travel"
  • "LowEngaged, Travel2"
  • "LowEngaged, Travel"

Again, any help is much appreciated.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Contributor
MVP
wodnicki
MVP

Likes

926 likes

Total Posts

1,056 posts

Correct Reply

494 solutions
Top badges earned
Contributor
Shape 1
Give Back 100
Give Back 50
Give Back 25
View profile

Avatar
Contributor
MVP
wodnicki
MVP

Likes

926 likes

Total Posts

1,056 posts

Correct Reply

494 solutions
Top badges earned
Contributor
Shape 1
Give Back 100
Give Back 50
Give Back 25
View profile
wodnicki
MVP

03-06-2020

Hi,

 

The answer to both questions is to use js; get the workflow's data clob then parse it for transitions, i.e.:

 

for each (var extract in workflow.activities.extract) {
  for each (var transition in extract.transitions.*) {
    // make use of transition.@label, transition.@target
  }
}

 

Thanks,

-Jon

Answers (1)

Answers (1)

Avatar

Avatar
Boost 50
MVP
Jyoti_Y
MVP

Likes

87 likes

Total Posts

123 posts

Correct Reply

55 solutions
Top badges earned
Boost 50
Shape 1
Boost 5
Give Back 5
Give Back 3
View profile

Avatar
Boost 50
MVP
Jyoti_Y
MVP

Likes

87 likes

Total Posts

123 posts

Correct Reply

55 solutions
Top badges earned
Boost 50
Shape 1
Boost 5
Give Back 5
Give Back 3
View profile
Jyoti_Y
MVP

04-06-2020

Hi,

If your split is one time configuration, you can do JS variables in Advanced tab of split.

Js you can use:

vars.split1="Engaged"

vars.split2="Low Engaged"

 

And then you can use these variables in your delivery as: <%=vars.split1%>

 

Thanks.