How to Convert string to lowercase in workflow?

Pranitha07
Tera Contributor

Hi Everyone 

 

I'm Trying to convert string to lowercase in workflow but it is not happening. below is the snippet of script and error message , please help me with the solution

Pranitha07_0-1709053721157.pngPranitha07_1-1709053731922.png

 

 

Thankyou,

Pranitha

2 REPLIES 2

James Chun
Kilo Patron

Hi @Pranitha07,

 

I think the 'newdevice' variable is not a string but an object. I assume you want to use the name of the 'u_devicename_task'?

If so, change your first line of script to something like:

var newdevice = workflow.inputs.u_devicename_task.name.toString();

Thanks

 

Tony Chatfield1
Kilo Patron

Hi, what happens if you move all of your variable assignment/toLowerCase() code into the 'ifScript' function?

Does it run correctly then?