Question Status

Verified
Jane L. Adney asked a question on 20 May 2013 9:10 AM

The users want the item number stripped of all special characters as the search name in the product master.  I have looked on the web, but I have not really found the solution that I am looking for to be able to do this.  Does anyone have a suggestion on how to remove all blanks and special characters?

Thank you

Reply
André Arnaud de Calavon responded on 20 May 2013 12:52 PM

It is possible to do a minor customization, but why do the users want to have the search name stripped? What functionality do they expect further or is it for searching purposes only?

Shakespeare once quoted: "What's in a name?". My quote: "What's in a number?"

As you don't give an example I cannot see the need at this moment.

kind regards,

André Arnaud de Calavon  |  Microsoft Dynamics AX Solution architect  |  My blog  |  My company

This post is my own opinion and does not necessarily reflect the opinion or view of my company, Microsoft, both its employees, or other MVPs.

Reply
Jane L. Adney responded on 20 May 2013 1:32 PM

The user wants to be able to put dashes or periods in the number, but not have those special characters in the search name.  They have this in the old system and expect it in the new system.  I just need to know how to make them happy.

Reply
Dominic Lee responded on 20 May 2013 9:27 PM

What about modifying NameAlias before a record is inserted into InventTable?

kind regards,

Dominic Lee

My blog | PBC

This forum post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

Reply
Dick Wenning responded on 21 May 2013 1:04 AM

in the worse case , write a new method on the class SysQueryRangeUtil

see also

technet.microsoft.com/.../aa569937.aspx

Kind regards, 

Kaya Solutions

Dick Wenning

+31 6 147 989 53 

Landjuweel 5

3905 PE - Veenendaal

 

OTHER CONTACT INFORMATION

Reply
Verified Answer
Jane L. Adney responded on 21 May 2013 1:44 PM

One of my co-workers figured out the solution that works great.

Static str stripStrings(str _InputString)

{

   str message;

   message =  System.Text.RegularExpressions.Regex::Replace(_InputString, @"[\W_]", "");

   return message;

}

Reply
Suggested Answer
Mark Prouty responded on 8 Sep 2014 5:59 PM

Native function strAlpha(inputString) seems to be the same as Jane's solution below.

Reply
Verified Answer
Jane L. Adney responded on 21 May 2013 1:44 PM

One of my co-workers figured out the solution that works great.

Static str stripStrings(str _InputString)

{

   str message;

   message =  System.Text.RegularExpressions.Regex::Replace(_InputString, @"[\W_]", "");

   return message;

}

Reply
Suggested Answer
Mark Prouty responded on 8 Sep 2014 5:59 PM

Native function strAlpha(inputString) seems to be the same as Jane's solution below.

Reply