Effective December 3, NetApp adopts Microsoft’s Business-to-Customer (B2C) identity management to simplify and provide secure access to NetApp resources.
For accounts that did not pre-register (prior to Dec 3), access to your NetApp data may take up to 1 hour as your legacy NSS ID is synchronized to the new B2C identity.
To learn more, read the FAQ and watch the video.
Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.

Active IQ Unified Manager Discussions

Escape the unescapeable (illegal escape sequence: F)

ninja

In WFA i'm trying to display the path to a share so that the person running the workflow can see what the share name will end up being. This share name is generated from other drop downs and fields that are populated. I'm using a sql query to generate a path such as \\somename\blah\blah\Flah. Not the best way of doing it but I see no other option to display to the users what the outcome will be.

 

When i run the workflow i get the expected error "illegal escape sequence: F". I have tried to create function to escape the \ and add a second \ to produce \\F or for any other character that comes before the backslash but it doesn't work because it errors because it doesn't understand the characters which are fed into it. Java escape characters are limited to these \t,\b,\n,\r,\f,\',\",\\ so if the share name contains any of that it will work...anything fails. Because I can't escape other letters after the backslash such as \F \Z \X it produces an error.

 

I know I can just produce the second backslash directly from the sql query but then the share name will look irregularly. (\\\\somename\\blah\\blah\\Flah).

 

Let me know if you have a better idea to try to display the share name.

 

One other things that I might try but not sure will work because the field will still error would be to create a second unopened/hidden field with the share name using the correct syntax and feed that to the command.

 

1 ACCEPTED SOLUTION

cbauernf

I played around with this a little bit and it seems it is only a problem if the variable begins with a backslash.  I put this in a QUERY type variable:

 

SELECT
    'UNC:\\\\strange\\share\\${yourtexthere}'

 

and it displays as expected:  UNC:\\strange\share\...  with the $yourtexthere user input replacing the ...

 

If you only need this user input for display purposes, that should be fine.  Otherwise it is easy to chop off the leading characters with some MVEL.

 

Christian

View solution in original post

4 REPLIES 4

Vinodhini

Hi,

 

You can enclose the UNC path with double quotes. It works in all the cases irrespective of if the path starts with a double backslash or not.

krishgudd

Double quotes options works perfectly.

 

I have one query reated to it. I am working in CIFS share setup work flow and part of it i am trying to applying NTF permissions using UNC path.

 

I am using one of the DAR provided by community member and in that workflow we have to mention UNC path to apply the permissions.

 

UNC path referred to as \\vserver FQDN\sharename

 

When i enter manually the UNC path  its working,but how to substitue the variables values in UNC path.

 

When i give \\$vsername\$sharename its not taking the values and throwing errors- Ilegeal expression.

 

I am attaching the DAR file which i dowloaded from the community.

 

 

cbauernf

I played around with this a little bit and it seems it is only a problem if the variable begins with a backslash.  I put this in a QUERY type variable:

 

SELECT
    'UNC:\\\\strange\\share\\${yourtexthere}'

 

and it displays as expected:  UNC:\\strange\share\...  with the $yourtexthere user input replacing the ...

 

If you only need this user input for display purposes, that should be fine.  Otherwise it is easy to chop off the leading characters with some MVEL.

 

Christian

View solution in original post

ninja

Oddly enough after adding some chars before the \\ and then chopping off the "UNC:" chars for the command input it allows the preview to run green.

 

I further tied to just leave the \\ at the beginning from the select statement and then tried to chop the \\ chars at the command input but that didn't work. I got the same illegal escape sequence. Very odd behavior.

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public