Sage 100

 View Only
Expand all | Collapse all

Blank Characters at the end of CI_ITEM Item Code field

  • 1.  Blank Characters at the end of CI_ITEM Item Code field

    Posted 03-06-2022 10:58
    I have a customer where a couple of items were having issues...and then I realized that the had the B character at the end.  I fixed a couple, but would like to confirm that no other item has the same issue.  If I do a crystal...it wont show.... how can I go about identifying them??? Any suggestions???

    ------------------------------
    Lourdes Sobrino
    LU² DSD Puerto Rico
    Guaynabo Puerto Rico
    787.485.9638
    ------------------------------


  • 2.  RE: Blank Characters at the end of CI_ITEM Item Code field

    Posted 03-06-2022 19:06
    Edited by Phil McIntosh 03-06-2022 19:06
    @Lourdes Sobrino - If you uncheck "Strip Trailing spaces" in the ODBC setup you should be able to check with Crystal  Suggestion for formula:  If Len(ItemCode) <> Len(Trim(ItemCode))​
    ------------------------------
    Phil McIntosh
    President
    Friendly Systems, Inc.
    Asheville NC
    678.273.4010 ext 5
    ------------------------------



  • 3.  RE: Blank Characters at the end of CI_ITEM Item Code field

    Posted 03-07-2022 07:22
    Thanks Phil...that gave me the ones with spaces at the beginning of the field....would it also get the ones that have them at the end of the field??? Just wondering....

    ------------------------------
    Lourdes Sobrino
    LU² DSD Puerto Rico
    Guaynabo Puerto Rico
    787.485.9638
    ------------------------------



  • 4.  RE: Blank Characters at the end of CI_ITEM Item Code field

    Posted 03-07-2022 07:36
    I would think so.  You could create one you know has blanks at the end as a test.

    ------------------------------
    Phil McIntosh
    President
    Friendly Systems, Inc.
    Asheville NC
    678.273.4010 ext 5
    ------------------------------



  • 5.  RE: Blank Characters at the end of CI_ITEM Item Code field

    Posted 03-07-2022 08:10
    It DOES NOT bring the blanks at the end of the item code....good try...thanks

    ------------------------------
    Lourdes Sobrino
    LU² DSD Puerto Rico
    Guaynabo Puerto Rico
    787.485.9638
    ------------------------------



  • 6.  RE: Blank Characters at the end of CI_ITEM Item Code field

    Posted 03-07-2022 08:13
    By the way...it is not literaly a blank .... it is the ß code....

    ------------------------------
    Lourdes Sobrino
    LU² DSD Puerto Rico
    Guaynabo Puerto Rico
    787.485.9638
    ------------------------------



  • 7.  RE: Blank Characters at the end of CI_ITEM Item Code field

    Posted 03-07-2022 09:13
    Do you know how they got in those item #'s?   Import?   Something may create more as you delete those existing ones.


    ------------------------------
    Lee Graham
    Friendly Systems, Inc.
    ------------------------------



  • 8.  RE: Blank Characters at the end of CI_ITEM Item Code field

    Posted 03-07-2022 09:47
    Someone likely copied a cell from Excel and pasted it in, at least, that is how that happened at several of the clients that I have troubleshooted this for.  Check instead using InStr and searching for Chr(13) or Chr(10), I suspect it will be the Chr(10).  So you can create two formulas, one to locate the position of each in the item code.
    InStr({CI_Item.ItemCode}, Chr(10))​
    Here is an example of an item code being forced in with a line feed and the two formulas used to look for either.  You can then use either formula in a record or group selection checking if they are greater than 0.


    ------------------------------
    David Speck II
    Tennessee Software Solutions
    ------------------------------



  • 9.  RE: Blank Characters at the end of CI_ITEM Item Code field

    Posted 03-07-2022 10:35
    THANKS David...that provided the 3 page listing...will have fun correcting them now...

    ------------------------------
    Lourdes Sobrino
    LU² DSD Puerto Rico
    Guaynabo Puerto Rico
    787.485.9638
    ------------------------------



  • 10.  RE: Blank Characters at the end of CI_ITEM Item Code field

    Posted 03-07-2022 11:27
    Edited by David Speck II 03-07-2022 11:27
    You should be able to import them into the IM_DeleteChangeItems.M4T table using VI.  You'll likely have issues getting the actual character in a text file that VI will read properly so you can do this one of two ways.  The first is far easier in my opinion because you'll be reading the values directly from the database using ODBC instead of manipulating a text file.
    1. When setting up the VI job, use ODBC as the source, point it to the SOTAMAS90 DSN. 
      1. If you want to save credentials, you do so by clicking the green key icon and enter the user and company separated by a vertical pipe character ( "|" ) and then enter the password.
      2. Click Tables, then go to the SQL tab and click Modify and paste the following.
      3. Select 
        CI_Item.ItemCode,
        {fn Replace({fn Replace({fn Replace(CI_Item.ItemCode, {fn Char(13)}, '')}, {fn Char(10)}, '')}, '0', '0')} As NewItemCode
        From
        CI_Item
        Where
        {fn Locate({fn Char(13)}, CI_Item.ItemCode)} > 0 
        Or
        {fn Locate({fn Char(10)}, CI_Item.ItemCode)} > 0 
      4. On the Data tab;
        1. The LineNo should be set to Incr Assign and have a blank default value.
        2. The StartingItemCode and EndingItemCode should be set to Replace and use column 1.
        3. The Operation should be assigned to 2.
        4. The NewItemCode should be set to Replace and use column 2.
        5. The AllFiles should be assigned to Y.
    2. Because VI doesn't handle reading inline line feeds or carriage returns well, you could use your crystal report to replace the actual characters with placeholder values that use can replace in the VI job, so in crystal, change line feeds to something like ~LF~ and carriage returns to ~CR~ in one column for the original number and in another column have crystal reports replace both carriage returns and line feeds with blank strings separately (use two cascading Replace functions, each looking for one character instead of one function looking for them combined) just in case you have instances where only one of the two made it into the data.  Then in the import, first start with a temp field on the original item code column, then add the start and ending item code fields using the calculation operation and use the SUB function to replace the placeholder values (~LF~ & ~CR~) with the actual values using the CHR function.  All other fields should be set up as they are in the SQL example above.
      1. SUB(SUB(Temp001$, "~CR", CHR(13)), "~LF~", CHR(10))


    ------------------------------
    David Speck II
    Tennessee Software Solutions
    ------------------------------



  • 11.  RE: Blank Characters at the end of CI_ITEM Item Code field

    Posted 03-07-2022 11:49
    Any chance they are scanning the item # via a bar code?  I had a client getting "B"'s in their item field which was traced back to canning input....



    ------------------------------
    Jeff Schwenk
    FORMER 90M Board Member -140,000,000 is a TERRIBLE thing to waste!!!
    Bottomline Software, Inc.
    Waynesboro VA
    540-221-4444
    ------------------------------



  • 12.  RE: Blank Characters at the end of CI_ITEM Item Code field

    Posted 03-08-2022 01:47
    I found exactly what @David Speck II said on a client about copying and pasting from an Excel file that is puts the weird B characters at the end.​

    ------------------------------
    [Michele] [Herzog] [CPA,CITP, CGMA]
    [Overland Park] [KS]
    [816-520-1365]
    ------------------------------



  • 13.  RE: Blank Characters at the end of CI_ITEM Item Code field

    Posted 03-08-2022 16:51
    That import looks kind of confusing… I would rather select the item one by one…..

    ---------------------------------
    Lourdes Sobrino
    LU² DSD Puerto Rico
    Guaynabo Puerto Rico
    787.485.9638
    ---------------------------------