<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Using  \ or \\ in User input in Active IQ Unified Manager Discussions</title>
    <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Using-or-in-User-input/m-p/132664#M24084</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to have a user specify a UNC path in the user input, but it's failing with the error: illegal escape sequence: C&lt;/P&gt;&lt;P&gt;If I add an extra \ it works. &amp;nbsp;\\\myserver.mydomain.net\\Folder1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to make it work so that the user doesn't have to add the extra \ &amp;nbsp;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using WFA 3.1SP2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Philip&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jun 2025 14:52:11 GMT</pubDate>
    <dc:creator>PHILIPALBERT</dc:creator>
    <dc:date>2025-06-04T14:52:11Z</dc:date>
    <item>
      <title>Using  \ or \\ in User input</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Using-or-in-User-input/m-p/132664#M24084</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to have a user specify a UNC path in the user input, but it's failing with the error: illegal escape sequence: C&lt;/P&gt;&lt;P&gt;If I add an extra \ it works. &amp;nbsp;\\\myserver.mydomain.net\\Folder1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to make it work so that the user doesn't have to add the extra \ &amp;nbsp;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using WFA 3.1SP2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Philip&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 14:52:11 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Using-or-in-User-input/m-p/132664#M24084</guid>
      <dc:creator>PHILIPALBERT</dc:creator>
      <dc:date>2025-06-04T14:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: Using  \ or \\ in User input</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Using-or-in-User-input/m-p/132676#M24086</link>
      <description>&lt;P&gt;Hi Philip,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a solution for you (maybe not the best method) but it can be used to work around the MVEL\Java escape character issue.&lt;/P&gt;&lt;P&gt;First of all create a custom MVEL function called replace. EG&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;def replace(input, find, replace){
   return input.replace(find, replace)
}&lt;/PRE&gt;&lt;P&gt;Then you can use this function in combination with the default "SplitByDelimiter" function. For example, consider the UNCPath:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"\\vserver1\share1$"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note: The UNCPath input parameter &lt;U&gt;&lt;STRONG&gt;MUST&lt;/STRONG&gt;&lt;/U&gt; be in quotes. EG:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.netapp.com/t5/image/serverpage/image-id/7394i797FC04C24E07439/image-size/original?v=1.0&amp;amp;px=-1" alt="wfa1.png" title="wfa1.png" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The MVEL to return the Vserver Name from the UNC Path input parameter, the MVEL expression is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;splitByDelimiter(replace(replace($UncPath, "\\", "="), "==", ""), "=", 0)&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Note: I first replace backslashes with an equals character (as this in an invalid charachter in a UNCPath). This is done first before removing the double equals characters at the start of the remaining string then splitting it on the equals character. If you want to return the CIFS share name then:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;splitByDelimiter(replace(replace($UncPath, "\\", "="), "==", ""), "=", 1)&lt;/PRE&gt;&lt;P&gt;&lt;IMG src="https://community.netapp.com/t5/image/serverpage/image-id/7395iBD3312C66FAA462D/image-size/original?v=1.0&amp;amp;px=-1" alt="wfa2.png" title="wfa2.png" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use this example command with a single input parameter (UNCPath) to test it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Param(
   [Parameter(Mandatory=$True, HelpMessage="The UNC Path of the CIFS share")]
   [String]$UncPath
)&lt;/PRE&gt;&lt;P&gt;Set the string Command's "string expression" to display the UNCPath input parameter:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.netapp.com/t5/image/serverpage/image-id/7396iAE5582EF4891C4B8/image-size/original?v=1.0&amp;amp;px=-1" alt="wfa3.png" title="wfa3.png" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then in your workflow when you assign a variable to the comand enter the MVEL expression:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;splitByDelimiter(replace(replace($UncPath, "\\", "="), "==", ""), "=", 0)&lt;/PRE&gt;&lt;P&gt;&lt;IMG src="https://community.netapp.com/t5/image/serverpage/image-id/7397i47A35A36B2E4C71B/image-size/original?v=1.0&amp;amp;px=-1" alt="wfa4.png" title="wfa4.png" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Matt&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2017 00:14:51 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Using-or-in-User-input/m-p/132676#M24086</guid>
      <dc:creator>mbeattie</dc:creator>
      <dc:date>2017-07-11T00:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using  \ or \\ in User input</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Using-or-in-User-input/m-p/132748#M24103</link>
      <description>&lt;P&gt;Hi Matt,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;When I saw that the string needs to be in quotes, I tried that without changing any of my code and it works.&lt;/P&gt;&lt;P&gt;So looks like the issue is there. &amp;nbsp;Is there a way to take the string entered by the user and add the quotes myself?&lt;/P&gt;&lt;P&gt;I hate relying on the user to input the quotes, I know lots of them will forget it.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 14:25:10 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Using-or-in-User-input/m-p/132748#M24103</guid>
      <dc:creator>PHILIPALBERT</dc:creator>
      <dc:date>2017-07-12T14:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: Using  \ or \\ in User input</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Using-or-in-User-input/m-p/132765#M24105</link>
      <description>&lt;P&gt;Hi Philip,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately i do not think there is any workaround for this (that i'm aware of). A UNC path input paramater to a workflow must contain quotes around it.&lt;/P&gt;&lt;P&gt;This is a Java\MVEL limitation. I'd suggest adding a description and a default value (in quotes) to the input parameter. EG&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.netapp.com/t5/image/serverpage/image-id/7408iFCD0D8D78DD971D0/image-size/original?v=1.0&amp;amp;px=-1" alt="wfa1.png" title="wfa1.png" border="0" /&gt;&lt;/P&gt;&lt;P&gt;/Matt&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 01:04:47 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Using-or-in-User-input/m-p/132765#M24105</guid>
      <dc:creator>mbeattie</dc:creator>
      <dc:date>2017-07-13T01:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using  \ or \\ in User input</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Using-or-in-User-input/m-p/132787#M24106</link>
      <description>&lt;P&gt;Thanks Matt, I'll add a description.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 19:16:24 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/Using-or-in-User-input/m-p/132787#M24106</guid>
      <dc:creator>PHILIPALBERT</dc:creator>
      <dc:date>2017-07-13T19:16:24Z</dc:date>
    </item>
  </channel>
</rss>

