Skip to main content
Solved

Workflow : Javascript Includes

  • February 18, 2025
  • 3 replies
  • 78 views

Forum|alt.badge.img+10

When applying includes on a string variable : 

I’m getting the following error : 

 

CustomerOrderHandling_Error_Log is well a string and i’m not able to apply the includes function.

 

any idea why? please?

 

@kamnlk  any idea please?

Best answer by Buddhi Gunasekara

String.includes() is an ES6 function, which is not supported by the script task. Can you try .IndexOf() instead?

View original
Did this topic help you find an answer to your question?

3 replies

Forum|alt.badge.img+7

String.includes() is an ES6 function, which is not supported by the script task. Can you try .IndexOf() instead?


Forum|alt.badge.img+10
  • Author
  • Hero (Customer)
  • 120 replies
  • February 18, 2025

that did it for me

thank you ​@Buddhi Gunasekara . 

could we have more explanation on what is es6 and the compatibility behind it please?


Forum|alt.badge.img+7

@IFSRUNINNOVAL,

ES6 stands for ECMAScript 6. It is a major revision of JavaScript language. ES6 added some new functionalities, including the String.includes() function. Currently, JavaScript in script task only supports functionalities before ES6.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings