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

Campaign Internalname Using javascript function returns blank

Avatar

Level 1

Hi,

I am trying to retrieve my current campaign name using instance.opertaion.Internalname. But it returns blank. can you please suggest which Js function will be working for retrieving campaign internal name. Apart from Sql query function. Appreciate your prompt response.

 

Thanks,

Gokul

1 Accepted Solution

Avatar

Correct answer by
Level 6

Hi @GOKUL35 ,

You can use the below JS in the campaign Workflow to retrieve the Campaign Internal Name

 

var query = xtk.queryDef.create(<queryDef schema="nms:operation" operation="select"><select><node expr="@id"/><node expr="@internalName"/></select><where><condition expr={"@id = '"+instance.operation_id+"'"}/></where></queryDef>); var eventExistss = query.ExecuteQuery(); for each (var eventT in eventExistss.operation){instance.vars.CampaignInternalName = eventT.@internalName;}

logInfo("Campaign Internal Name: "+instance.vars.CampaignInternalName);

ParthaSarathy_0-1661500542588.png

 



 

View solution in original post

1 Reply

Avatar

Correct answer by
Level 6

Hi @GOKUL35 ,

You can use the below JS in the campaign Workflow to retrieve the Campaign Internal Name

 

var query = xtk.queryDef.create(<queryDef schema="nms:operation" operation="select"><select><node expr="@id"/><node expr="@internalName"/></select><where><condition expr={"@id = '"+instance.operation_id+"'"}/></where></queryDef>); var eventExistss = query.ExecuteQuery(); for each (var eventT in eventExistss.operation){instance.vars.CampaignInternalName = eventT.@internalName;}

logInfo("Campaign Internal Name: "+instance.vars.CampaignInternalName);

ParthaSarathy_0-1661500542588.png