
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2020 03:13 PM
Hi All,
I have created a workflow on RITM table. In that workflow I have used a run script activity. Inside that activity, I am inserting a record in custom table. While setting one field value of that table I am getting an error. Field should be as shown below-
var domain = '';
var deviceName = '';
Now I am setting the value of above 2 variables in the script. The value coming dynamically. Now I wanted to concatenate these 2 variable value add would like to add a backslash in b/w them like below-
Var obj = domain + '\' + deviceName;
Example: var obj = UK\test;
now this backslash is giving error
If I use any space or any other character just after backslash then I am not getting error. But I don't want to use any space after that. See no error when I have uses space
I tried substring, split and trim and slice. But did not work.
Please help.
Regards,
Gaurav
Solved! Go to Solution.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2020 03:19 PM
try this. ( \' ) is an escape character so prefixing this with another backslash will remove one backslash and you will only left with one.
var obj = domain + '\\' + deviceName;
Muhammad

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2020 03:19 PM
try this. ( \' ) is an escape character so prefixing this with another backslash will remove one backslash and you will only left with one.
var obj = domain + '\\' + deviceName;
Muhammad

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2020 01:44 PM
Thanks. It worked.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2020 02:46 PM
Happy to Help. 🙂
Muhammad