Skip to main content

Hi all,

I’m Darshan Hiranandani, trying to use the "Run Javascript" action in Automation Anywhere with manual input, but I need to reference an RPA variable within the JavaScript code.

For example, I have a variable $variableInRPA$ (which holds a value like 50), and I want to add 10 to it in the JavaScript code, then return the result. Here's what I’ve been attempting:

(function(){
    var variableInManualInput = $variableInRPA$;
    var result = variableInManualInput + 10;
    return result;
}());

Is there a way to pass the RPA variable into the JavaScript code correctly? I’m unsure how to reference it properly for this use case.

Has anyone encountered this before and figured out a solution? Any tips or suggestions would be greatly appreciated!

Thanks in advance!

Regards

Darshan Hiranandani

Be the first to reply!

Reply