How to get value fetched by JavaScript into arugument in AssistaEdge

I am trying to fetch the length into a argument after executing JavaScript but not able to fetch it into argument to use further. Can anyone help me with that


You need to do mapping of output argument to the returned value

Amit Anand

My Argument is XYZ and want fetch length of a value. tried these way but didn’t work.

  1. XYZ = $(’#DC option’).length;

2.var abc = $(’#DC option’).length;
XYZ = abc;


In studio create an argument xyz.

In JS activity write return <Javascript query which will return some value>

Map your argument xyz in out put argument dropdown

i tried these but didn’t work and also in arguments XYZ direction is out .
var XYZ = document.getElementById(“DC”).length;
return ;
var XYZ = document.getElementById(“DC”).length;
return XYZ;


This is not correct. In java script block write
return document.getElementById(“DC”).length

map argument xyz in Select output mapping dropdown