Setting a Variable in WF to be used in another WF | Community
Skip to main content
Level 4
May 24, 2022
Solved

Setting a Variable in WF to be used in another WF

  • May 24, 2022
  • 1 reply
  • 765 views

Hello, 

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

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

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

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Manoj_Kumar

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 %>

1 reply

Manoj_Kumar
Community Advisor
Manoj_KumarCommunity AdvisorAccepted solution
Community Advisor
May 24, 2022

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 %>
Manoj     Find me on LinkedIn
Level 4
June 1, 2022

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.