Switch case statement in a script

jasleen3
Kilo Contributor

Hi,

My script is running fine if I am using "if statement", but if i use switch it's not working at all.

find_real_file.png

19 REPLIES 19

This solved it for me - thanks!

Hi Christineymayfield,

Is it possible to get date automatically in the "Next Update Due" field based on Severity field.

As the "Next Update Due" field is Date Type but Severity field is String Type.

 

find_real_file.png

markushammelman
Tera Contributor

I had the same issue. I worked when I added +'' to the variable. In your case

 

var country = current.requested_for_country+'';

 

Let me know if that worked, best regards, Markus

I get a parsing error with that approach...

I needed to add +"" , then worked fine.  A plus and two quotes.

Thanks,

Scott