vinojash / UIPath-JS

Ability to run javascript in UIPath designer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UIPath-JS

Ability to run javascript (nodejs) in UIPath designer (still under development, more functionality will be added in upcoming release..!)

Download nuget package here

Thanks to EdgeJS

Click here to Edge git repository

How to use

Download and install the above nuget package to your designer then, Create a Blank Process in UIPath Designer,then add Input Dialog, Execute Javascript and Message Box activity and connect those three in sequential manner. 

Create two string variables called "data" and "output"

Get any string value from user and store it in string variable "data" using Input dialog activity.

Pass the "data" variable value to "Data" input of execuite java script activity,(Execute javascript activity internally uses one variable name called data, which is outout of the same activity)

Pass the static string format of javascript function to "JSFunction" input of execuite java script activity

Javascript

function palindrome(str) {
    var re = /[\W_]/g;
    var lowRegStr = str.toLowerCase().replace(re, '');
    var reverseStr = lowRegStr.split('').reverse().join('');
    if (reverseStr === lowRegStr) {
        return 'Yes, ' + str + ' is a palindrome..!';
    } else {
        return 'No, ' + str + ' is not a palindrome..!';
    }
}
data=palindrome(data); //data will be both input and output
Map the "output" variable as Result of execuite java script activity and Map the "output" variable to Message box to show the result to user..!

Run the bot & try to give different kind of inputs like "MADAM", "INDIA", "APPLE", etc 

About

Ability to run javascript in UIPath designer

License:Apache License 2.0


Languages

Language:C# 55.7%Language:JavaScript 41.3%Language:HTML 3.0%