Advance JavaScript support in Action Center

Here’s a quick piece of information that I would like to share from my experience from working on UiPath Action Center.

In the form that we create in the action center, we have a feature where we can write advanced logic using JavaScript for different form controls like TextField, Dropdowns, etc…

Considering one such case where we write to write a code to text if the text fields contains a particular value or not we would normally go ahead and use contains function in the following way: data.TextFieldKey.Contains("containsValue")

But you wouldn’t be getting output as expected the reason for the following is the last line of the following documentation: https://docs.uipath.com/activities/other/latest/workflow/adding-advanced-logic-using-java-script

You have to check whether the function that you’re planning to use is supported in ECMAScript 5 if not then you need to find some alternative for that function.

For the above scenario you can use indexOf function to check the contains value instead of contains function.