Javascript windows file path work notes text field

Wyatt Fudal1
Tera Guru

Hello all,

Ran into a weird request. I have to enter a Windows file path into a child incident work notes. The child ticket is created via a UI action. If I keep \\test\test\filelocation in the script. The translation is not correct. I never had to do this before, and I think it's a unique ask. Has anyone run into a similar issue and found a workaround?

WyattFudal1_0-1706892021309.png

WyattFudal1_1-1706892238410.png

 

1 ACCEPTED SOLUTION

Siddhesh Gawade
Mega Sage
Mega Sage

Hello @Wyatt Fudal1 ,

 

In JavaScript, the backslash (\) is an escape character, which means it's used to introduce special character sequences. If you want to include an actual backslash in a string, you need to escape it using another backslash.

 

So Instead of "\\test\test\filelocation", use "\\\\test\\test\\filelocation". 

 

Kindly mark the answer ✔️Correct or Helpful ✔️If it addresses your concern.


Regards,

Siddhesh

View solution in original post

3 REPLIES 3

Siddhesh Gawade
Mega Sage
Mega Sage

Hello @Wyatt Fudal1 ,

 

In JavaScript, the backslash (\) is an escape character, which means it's used to introduce special character sequences. If you want to include an actual backslash in a string, you need to escape it using another backslash.

 

So Instead of "\\test\test\filelocation", use "\\\\test\\test\\filelocation". 

 

Kindly mark the answer ✔️Correct or Helpful ✔️If it addresses your concern.


Regards,

Siddhesh

Hello @Wyatt Fudal1 ,

 

Does this solution helped you. Please let me know. 

 

If yes, It would be great if you mark my response as CORRECT or Helpful so that others can see this on top of the list and get benefited by this.

It worked thank you.