Sage 100

 View Only
  • 1.  Script to set salesperson based on zip codes

    Posted 03-10-2023 13:05

    Hi All,

        I have a script for one of my clients that currently sets the salesperson on orders based on the ship to state and a UDF.   Now they want different assignments for Southern California vs Northern California.  The only way I can see to do this is based on the zip code.  Of course it is not a contiguous range, has a lot of ranges of numbers and some single numbers with in it.  I am really struggling on the syntax for the if statement and all the references I find talk about doing it for Excel which is not what I am doing.  Do I have to do a bunch of greater than and less than ranges?  It would be nice if there was some sort of in function that would do this were I could put in the ranges as well as the individual numbers but at this point I will take whatever will work.

    Thanks Much!



    ------------------------------
    Bob Osborn
    Consultant
    ACI Consulting
    ------------------------------


  • 2.  RE: Script to set salesperson based on zip codes

    Posted 03-10-2023 13:11

    I work in Providex and I'm not a scripting expert, but I think I would look at adding a UDT in Sage and populate the zip codes and a second field that signifies Northern/Southern. Then in the script open the table and find the referenced zip code.

     

    Maybe one of the scripting experts could help with syntax to open and read a UDT (I think it is possible)

     

     

     

    Attend our free webinar: Eliminate Friction in Your AP workflow

    Don't miss out on the 2023 Basic Crystal Reports for Sage 100 Online Training: View the details

    Don't miss out on the 2023 Intermediate Crystal Reports for Sage 100 Online Training: View the details

     

    David Overholt

    DWD Technology Group, Inc.

    9921 Dupont Circle Drive West, Suite 300 | Fort Wayne, IN 46825

    260.423.2414 main

    260.399.8655 Direct

    800.232.8913 toll free

    sagesupport@dwdtechgroup.com

    www.dwdtechgroup.com

     

     






  • 3.  RE: Script to set salesperson based on zip codes

    Posted 03-10-2023 13:26

    Add an automated alert to notify them when there are new California ZIP codes not included in the UDT.



    ------------------------------
    Kevin Moyes
    Technical Systems Analyst
    Munjal White Consulting Co.
    ------------------------------



  • 4.  RE: Script to set salesperson based on zip codes

    Posted 03-10-2023 14:29

    Thanks @David Overholt    Sometime I get too far down the rabbit hole   Realizing now that I have another assignment script that uses a UDT..  That should do the trick!



    ------------------------------
    Bob Osborn
    Consultant
    ACI Consulting
    ------------------------------