Variables in File Name

Avatar

Avatar
Validate 10
Level 2
alistairk396804
Level 2

Likes

14 likes

Total Posts

45 posts

Correct reply

4 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 2
alistairk396804
Level 2

Likes

14 likes

Total Posts

45 posts

Correct reply

4 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
alistairk396804
Level 2

20-02-2017

Hi,

I'm extracting a file and would like to include the campaign name in the filename.

<%= instance.label %> gives me the workflow name. This works perfectly.

In the script drop down I'm given the option to navigate to the Campaign level and select the following '<%= instance.operation.label %>', however on extract this supplies a blank and populates the filename with nothing.

I have the Campaign Name in the target data in the transition prior to the data extract. Can I use this? If so how?

 

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Employee
Vapsy
Employee

Likes

370 likes

Total Posts

726 posts

Correct reply

342 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Validate 1
Employee
Vapsy
Employee

Likes

370 likes

Total Posts

726 posts

Correct reply

342 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile
Vapsy
Employee

23-02-2017

Hi Alistair,

Even I'm finding it strange that instance.operation.label is not fetching the correct details.I'll check more on this with product engineers.

However, I do have a workaround available for your problem.

  1. Inside the file export activity, on the advanced tab there is an Initialization Script section.
  2. I'll create a variable that will hold the campaign label.
  3. To fetch campaign label, fire a SQL query on database and get the result immediately.

Code to use in Initialization script will be 

var myQuery = "SELECT O1.sLabel "; myQuery = myQuery + "FROM XtkWorkflow W0 JOIN NmsOperation O1 "; myQuery = myQuery + "ON (O1.iOperationId = W0.iOperationId) "; myQuery = myQuery + "WHERE W0.iWorkflowId = " + instance.id; vars.fName = sqlGetString(myQuery) + ".csv";

 

Attached is the snapshot of my test setup for reference. 

Hope this helps.

Regards,

Vipul

Answers (8)

Answers (8)

Avatar

Avatar
Level 1
anurags71391525
Level 1

Likes

0 likes

Total Posts

6 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
anurags71391525
Level 1

Likes

0 likes

Total Posts

6 posts

Correct reply

0 solutions
View profile
anurags71391525
Level 1

17-02-2020

@Vapsy Hi Vipul, instance.operation.label still doesn't work. 

Do we have any update or alternate to above question?

Avatar

Avatar
Validate 1
MVP
kapilKochar
MVP

Likes

130 likes

Total Posts

144 posts

Correct reply

45 solutions
Top badges earned
Validate 1
Contributor
Give Back 10
Give Back 5
Give Back 3
View profile

Avatar
Validate 1
MVP
kapilKochar
MVP

Likes

130 likes

Total Posts

144 posts

Correct reply

45 solutions
Top badges earned
Validate 1
Contributor
Give Back 10
Give Back 5
Give Back 3
View profile
kapilKochar
MVP

11-08-2019

Any update on this one? Adobe Campaign Classic

Avatar

Avatar
Validate 1
Level 1
scott-simmer
Level 1

Like

1 like

Total Posts

10 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
scott-simmer
Level 1

Like

1 like

Total Posts

10 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
scott-simmer
Level 1

16-06-2019

Hi Vipul, can you drop the NEO adobe jira ticket ID for this please?  Thanks a lot.

Avatar

Avatar
Validate 1
Level 1
scott-simmer
Level 1

Like

1 like

Total Posts

10 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
scott-simmer
Level 1

Like

1 like

Total Posts

10 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
scott-simmer
Level 1

10-05-2019

Hi Vipul,

This issue still appears to be open as of 8931:  Could you provide the adobe Jira ticket number and any update on it?

Thanks very much !

Avatar

Avatar
Validate 1
Level 2
james_icf
Level 2

Likes

9 likes

Total Posts

20 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
james_icf
Level 2

Likes

9 likes

Total Posts

20 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile
james_icf
Level 2

03-04-2018

Vipul, was there ever any feedback on this?

Avatar

Avatar
Validate 1
Employee
Vapsy
Employee

Likes

370 likes

Total Posts

726 posts

Correct reply

342 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Validate 1
Employee
Vapsy
Employee

Likes

370 likes

Total Posts

726 posts

Correct reply

342 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile
Vapsy
Employee

01-03-2017

alistairk39680404 wrote...

Hi Vipul,

Just wondering if you had any luck with the product engineers regarding that fact that <%= instance.operation.label %> is returning a null or undefined value from within a campaign?

Thanks!

 

Hi Alistair,

This has been logged with Engineering but it might take some time to get an answer for it. Will keep this thread updated.

Regards,

Vipul

Avatar

Avatar
Validate 10
Level 2
alistairk396804
Level 2

Likes

14 likes

Total Posts

45 posts

Correct reply

4 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 2
alistairk396804
Level 2

Likes

14 likes

Total Posts

45 posts

Correct reply

4 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
alistairk396804
Level 2

01-03-2017

Hi Vipul,

Just wondering if you had any luck with the product engineers regarding that fact that <%= instance.operation.label %> is returning a null or undefined value from within a campaign?

Thanks!

Avatar

Avatar
Validate 10
Level 2
alistairk396804
Level 2

Likes

14 likes

Total Posts

45 posts

Correct reply

4 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 2
alistairk396804
Level 2

Likes

14 likes

Total Posts

45 posts

Correct reply

4 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
alistairk396804
Level 2

21-02-2017

For some reason when creating using the instance.operation.label I am returning a null value which is confusing as the Campaign this workflow in running in has a populated label.

So I'm trying a new approach.

How do I replace the hardcoded text with a field held in my target data?

instance.vars.AKTEST = "Campaign Name"

I want to replace "Campaign Name" with the field @campaignLabel which I have appended in a previous enrichment.