Sage 100

 View Only
  • 1.  Overriding UDF value in SO Detail Entry generates message (see screenshot)

    Posted 09-24-2020 19:00
    v2020.  CI_Item UDF, string, max. length = 10, format mask:ZZZZ.ZZ.ZZZZ.  Data is populated in flows into SO Line Detail.  If I override the data and key in a different character string (and I'm not keying in the periods), I get the message "the HTS is greater than 10 character(s) and won't write the data.

    I see 10 characters in DFDM in SO Detail and in CI_Item
     What am I doing wrong?  Something about the masking?
    UDF Message


    ------------------------------
    Barbara Goldstein
    Sr. Consultant
    DSD Business Systems
    San Jose CA
    800.627.9032 x221
    ------------------------------


  • 2.  RE: Overriding UDF value in SO Detail Entry generates message (see screenshot)

    Posted 09-25-2020 02:07
    Edited by Alnoor Cassim 09-25-2020 02:28
    It's a display mask for the screen so I'm pretty sure you should increase the length to 12. You may have to also delete the HTS field in the grid with Customizer then add it back in.  It's the same idea when you create a date UDF where the length is hard-coded at 10 automatically for you and that is so when you add it to the panel you can see the slashes in the display of the date. However you know obviously, as verified with DFDM, that date fields are physically stored with only 8 digits in the YYYYMMDD format. So I think you're dealing with the same thing.

    ------------------------------
    Alnoor Cassim

    Email: alnoor@asifocus.com
    Ph: 949-689-9887
    Orange County, CA
    ------------------------------



  • 3.  RE: Overriding UDF value in SO Detail Entry generates message (see screenshot)

    Posted 09-25-2020 18:17
    @Alnoor Cassim, if I'm understanding you correctly, I should increase the length of the UDF to 12 characters.  But then the mask is required to be 12 characters, which is not what we want.​

    ------------------------------
    Barbara Goldstein
    Sr. Consultant
    DSD Business Systems
    San Jose CA
    800.627.9032 x221
    ------------------------------



  • 4.  RE: Overriding UDF value in SO Detail Entry generates message (see screenshot)

    Posted 09-25-2020 20:45
    Edited by Alnoor Cassim 09-25-2020 20:48
    Oh yes you're right about that. Oops! That's the problem with near midnight circling the drain ramblings. Sorry here's another way to accomplish what you need.

    1. Increase the length to 12 (try it with another UDF for testing if you like)
    2. Remove the existing mask so there is no mask and update the UDF. You might need to also with Customizer remove UDF_HTS from the grid and re-add. Not sure.
    3. Create a short script to run on Post-Validate of UDF_HTS field (see below). The idea is on the screen you will only enter 10 digits without entering any dots and script will format it with the dots for you. But you have to enter the full 10 digits.

    Also all 12 characters including the dots would be stored. Hope that's okay.

    sHTS = value
    If Len(sHTS) = 10 Then
    sFullHTS = Left(sHTS,4) & "." & MID(sHTS,6,2) & "." & Right(sHTS,4)
    r=oScript.DeactivateProcedure("*ALL*")
    r=oBusObj.SetValue("UDF_HTS$", sFullHTS)
    r=oScript.ActivateProcedure("*ALL*")
    End If​


    ------------------------------
    Alnoor Cassim

    Email: alnoor@asifocus.com
    Ph: 949-689-9887
    Orange County, CA
    ------------------------------



  • 5.  RE: Overriding UDF value in SO Detail Entry generates message (see screenshot)

    Posted 09-28-2020 00:27
    This was resolved by setting the grid field's screen mask to 10 characters (ZZZZ.ZZ.ZZZZ), but having the UDF at 12 characters with no mask. No script is needed on the sales order detail UDF field, but a one line Column Pre-Validate script on the CI_Item.UDF_HTS field was used to limit the size entered to 10 characters.

    if Len(value) > 10 Then retVal = oScript.SetError("This field is limited to 10 characters!") End If​

    ------------------------------
    Dan Burleson
    Software Consultant
    Connex Software
    Corvallis OR
    541-224-6642
    ------------------------------