Javascript functions in expression editor to assign a value in new variable/column
Hello All
I am trying to dynamically assign a value in the query parameter to a new variable using an existing column value.
For example, if the column value is 50001 then the new variable value should be 50000, if the existing column value is 600032 then the variable value should be 600000.
cid = did
20023 = 20000
30056 = 30000
1200001 = 1200000

I am able to get the required value in JS like this:
var dId = 10012;
var cId = Math.pow(10, (dId.toString().length - 2)) * parseInt(dId.toString().slice(0, 2));
but I am not able to use this function in Query activity's expression editor with something like this

Is there any way I can acheive this??? Please help!
Thanks in advance...