Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!
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
Community Advisor

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
Community Advisor

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