Campaign Internalname Using javascript function returns blank | Community
Skip to main content
August 26, 2022
Solved

Campaign Internalname Using javascript function returns blank

  • August 26, 2022
  • 1 reply
  • 803 views

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

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 ParthaSarathy

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);

 



 

1 reply

ParthaSarathy
Community Advisor
ParthaSarathyCommunity AdvisorAccepted solution
Community Advisor
August 26, 2022

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 S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups