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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Setting a Variable in WF to be used in another WF

Avatar

Level 2

Hello, 

I created the following variable in an Enrichment just before a Delivery activity: 

montezh2001_0-1653431304993.png

But when I try to pull that variable into the Delivery Script as a Delivery, I get an error: 

montezh2001_2-1653431505529.png

montezh2001_3-1653431717605.pngmontezh2001_4-1653431748488.png

Any ideas on what I'm missing?  I can see the variable created, but not sure why it's not getting recognized. 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @montezh2001 

 

You are trying to save the value of the dmOutboundFlag in the delivery schema and there is no such field in the schema.

 

Replace

delivery.dmOutboundFlag =vars.dmOutboundFlag;

with

delivery.variables._var[0] = vars.dmOutboundFlag;

Then in the delivery properties create a variable with the name "dmOutboundFlag".

 

Now you can use this variable in the email delivery like this.

<%= variables.dmOutboundFlag %>

View solution in original post

0 Replies

Avatar

Correct answer by
Community Advisor

Hello @montezh2001 

 

You are trying to save the value of the dmOutboundFlag in the delivery schema and there is no such field in the schema.

 

Replace

delivery.dmOutboundFlag =vars.dmOutboundFlag;

with

delivery.variables._var[0] = vars.dmOutboundFlag;

Then in the delivery properties create a variable with the name "dmOutboundFlag".

 

Now you can use this variable in the email delivery like this.

<%= variables.dmOutboundFlag %>

Avatar

Level 2

Thank you for your help. 

 

This didn't work for what I was trying to do, but it was a solution for another problem I was having. 

 

For the original problem, I set an Option in the outbound workflow, and in the Inbound workflow that was triggered from the outbound, I used a getOption in a Test activity to determine which transition my workflow needed to process. I reset the option once a path was established. 

 

Thank you again.