What happens when the segments in the subaccounts have "-" as part of the segments

Posted 2 months ago by Jeffrey Patch

Jeffrey Patch

2 Votes

I had a client where the subaccounts consisted of multiple segments.  But in one of the segments, they had values that included "-".

e.g.  Subaccount structure was aaa-bbb-ccccccc,  but some of the ccccccc segment values included hyphens such as A-12345
Velixo did not like this when I used the full delimited subaccount code  AAA-BBB-C-12345.

To work around this I used the undelimited subaccount strings. so instead of AAA-BBB-C-12345.I used AAABBBC-12345.  

2 Votes


Sorted by
Gabriel Michaud

Gabriel Michaud posted 2 months ago Admin


Thanks for sharing this tip and welcome to the community forums. I would like to share more information on the reason for this behaviour.

The ERP system does NOT store the segment separators in the database. When querying, we therefore need to ensure the value we send matches what's in the database. Our default behaviour is to strip out (remove) the "-" entered by the user, assuming it's a normal segmented field. We have no way to know how the segments are configured and therefore need to have logic in place to handle cases where the user does not user segments (it's optional) and instead has the "-" directly in the value. While retrieving data into our cache, if we detect hyphens in any of the values returned by the ERP this tells us that the field is not segmented, and we deactivate the part that is normally responsible for stripping out the "-" entered in your subaccount (or any other segmented field) filter.

In most cases I've found that the presence of hyphens in fields that are segmented is rarely intentional. Entering a hyphen in the subaccount column for example simply moves you to the next segment. It's either data that was imported incorrectly during the initial configuration, or a transient bug that allowed you to create a value on the fly. Here's a good example that I found recently:

This tends to cause other issues with report ranges, wildcards, etc. even inside the ERP (and not just Velixo). My recommendation is always to clean up this data. From the subaccounts page, you can change subaccount codes which allows you to:

  1. Replace any hyphen with another character
  2. Ensure every character of every segment is filled -- I suggest avoiding spaces. You can put 0, X, or Z if you don't know what to put.
  3. Make any subaccout that shouldn't be used inactive

0 Votes

Damien Zwillinger

Damien Zwillinger posted 2 months ago Admin

Thanks Jeffrey, and welcome to the community forums!

0 Votes

Login or Sign up to post a comment