Dear Epicor, it's time to abandon leading spaces as valid characters

  1. "Your Part is average costed…Do you really want to put the bin into -ve?..
1 Like

Other than whitespace characters, that special characters list is effectively a list of C# (and others…) operators and expressions! Little Bobby Tables strikes again?

Jenn - I take exception to avoiding a hyphen - in a part number. I could see making it a no-no to lead or end with a hyphen, but to not be able to use one in the middle of part number is a deal breaker for most folks. Especially if your configurator makes an intelligent P/N where fields are delimited by the hyphen.

Right, that’s the oddest one, but I’ve seen this advice before. In the back of my mind, it has to do with possible GL account separators, and I know it makes no sense. I’m trying to find that discussion here…

We actually do use the hyphen :grinning: . I’ve been through several part conversions and seen spaces, %, and *. Those are the ones that make me shudder. I forgot the list said to avoid hyphens.

Best I could find was the idea that a dynamic GL segment can be a part number. So if you use hyphens as the segment separators AND hyphens in your part numbers, this would get confusing at best.

Edit - oh here it is:

I inherited a system that had part numbers like: 3/8" EYEBOLT

in before …
:scream:

I know what many of us think about the topic but @JasonMcD is this an Idea yet? I have votes I can cast toward it and it looks like it’d have a bunch of support from other folks here. A community effort is fine and all but ultimately having the core business logic do this would reach more customers.

List of Hex Characters that will cause your Epicor Multi-Company to crash… You will need to prevent it on GlbPart and Part for example. You can make a List and then there is a LINQ one liner to trim them, I am not on PC. But thats it in a Nutshell.

CHAR(0x1f)
CHAR(0x1a)
CHAR(0x1e)
CHAR(0x13)
CHAR(0x17)
CHAR(0x1d)
CHAR(0x1c)
CHAR(0x11)
CHAR(0x02)
CHAR(0x14)
CHAR(0x01)
2 Likes

Ah, no, not yet. I was trying to garner some anger support here before moving forward. Yes, I had a plan.

OK, I’ll go make the idea.

2 Likes

:+1: For providing the list

:-1: For them not being in order

Just curious … What collation does the Erp DB use?

Somebody, somewhere, must have pasted text with unicode characters into a field in Epicor.

Trying to understand this word from the googling.

Meaning, what is the sort order? Sorry, #NotACoder

Collations in SQL Server provide sorting rules, case, and accent sensitivity properties for your data . Collations that are used with character data types, such as char and varchar, dictate the code page and corresponding characters that can be represented for that data type.

In most basic terms how the data is encoded. The default for English (United States) is
SQL_Latin1_General_CP1_CI_AS

Guarantee those are not the most basic terms, as “encoding” is a word I use… never.

But I’m poking fun, and the rest of your answer helped a lot.

Done.

https://epicor-manufacturing.ideas.aha.io/ideas/KIN-I-3355

1 Like

Voted, I’d like to see the other special characters also included in the Idea not just a leading space.

1 Like

Awesome! I got a vote back sometime last week, so you got it for this idea. Thanks for creating it.

2 Likes

I just ran across this today. Luckily it was in Customer Part Cross Reference.

Ugh, now I gotta see if I can fix it or work around it.

star trek spock GIF

I will probably, one day, deploy something like this on a function and hook every Update pre-proc BPM to it.

Forget about blacklisting characters. Stick to a whitelist.

char[] allowedSymbols = { '/', '\\', ',', '.', '-', '#' };
//adjust as required. I'm not even sold on allowing "\"
    
for (int i = 0; i < Input.Length; i++)
{
    if(i == 0 && !Char.IsLetterOrDigit(Input[i]))
    {
        Result = false; //I hate leading special characters.
        return;
    }
    else if (!Char.IsLetterOrDigit(Input[i]) && !allowedSymbols.Contains(Input[i]))
    {
        Result = false; 
        return;
    }
}
4 Likes