Sage 100

Β View Only
Expand all | Collapse all

(Tutorial) Adding additional tables to Lookups

  • 1.  (Tutorial) Adding additional tables to Lookups

    Posted 04-19-2019 17:15
    So @Beth Bowers asked me to look into something and here is the result. 

    If you have ever wanted to pull in another table and its fields into an Advanced Lookup but didn't see the table listed, in most cases you can add the table by defining the link yourself.

    Sage 100 maintains the links for the ALEs in "MAS90\MAS_SYSTEM\SY_ExportLink.M4T".

    You can either DFDM your desired link into or use VI Export to add and maintain links which will be visible in the ALE customization.

    You don't even have to save the export, just pick a random export job already defined or start a temp one and click the "Link" button.


    Enter or lookup the primary table.


    The list box will show you links that are already defined for the primary table. If you don't see one already for your "link" table, enter or look it up.


    Since no links exist, you'll key in a sequence number, which in this case can be "00".


    Now define the link between the key fields, for this table combo, it is "APDivisionNo+VendorNo".


    Hit "Accept". If you go back to the primary table, you should now see the link.


    This creates the following record.


    Which now shows up in ALE customization.



    #Sage100
    #TipsAndTricks ​​
    #Tutorial​​

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


  • 2.  RE: (Tutorial) Adding additional tables to Lookups

    Posted 04-23-2019 13:32
    Awesome, thanks

    ------------------------------
    Cynthia Hay
    Hughes Systems Group, LLC
    ------------------------------



  • 3.  RE: (Tutorial) Adding additional tables to Lookups

    Posted 08-01-2024 10:49

    I want to create a custom ALE in inventory inquiry to see Qty on SO and Qty on Backorder.  The customer only uses warehouse 000.  So the primary table is CI_Item and the link table is IM_ItemWarehouse.  Is this possible?  If so, what should the key expression be?  I tried CI_Item+"000" and only 0.00 appears in the lookup for Qty on So and Qty on Backorder. 



    ------------------------------
    Doug Higgs
    Midwest Commerce Solutions, Inc
    (312) 315-0960
    Chauffeur, Chef, and Personal Assistant to Sprinkles
    ------------------------------



  • 4.  RE: (Tutorial) Adding additional tables to Lookups

    Posted 08-01-2024 11:13

    It is possible, I don't recall if you can enter a literal string but you can try it.  At the very least, you can always use ItemCode+DefaultWarehouseCode.



    ------------------------------
    David Speck II
    Blytheco LLC
    ------------------------------



  • 5.  RE: (Tutorial) Adding additional tables to Lookups

    Posted 08-01-2024 12:06

    Thanks @David Speck II !  ItemCode+DefaultWarehouseCode worked great.



    ------------------------------
    Doug Higgs
    Midwest Commerce Solutions, Inc
    (312) 315-0960
    Chauffeur, Chef, and Personal Assistant to Sprinkles
    ------------------------------



  • 6.  RE: (Tutorial) Adding additional tables to Lookups

    Posted 08-01-2024 11:14

    Not to steal ANY of @David Speck II posts (they are truly amazing) but I want to give a shout out to @David Overholt for an oldie but still very goodie for his trail blazing work back in the day..

    I'm trying to figure out the easiest way to lookup | Sage 100 (90minds.com)



    ------------------------------
    Jeff Schwenk
    Bottomline Software, Inc.
    (540) 221-4444
    ------------------------------



  • 7.  RE: (Tutorial) Adding additional tables to Lookups

    Posted 08-01-2024 11:45

    Thanks for the Shout-out Jeff,

    Even a blind squirrel finds an acorn every now and then. 😊

     

     

     

    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

     

    A black background with white text  Description automatically generated

     






  • 8.  RE: (Tutorial) Adding additional tables to Lookups

    Posted 10-09-2024 20:26

    @Doug Higgs - Just used your Qty on SO, PO and BO "join".  Worked great!!



    ------------------------------
    Jeff Schwenk
    Owner
    Bottomline Software, Inc.
    Waynesboro VA
    (540) 221-4444
    ------------------------------



  • 9.  RE: (Tutorial) Adding additional tables to Lookups

    Posted 03-04-2026 09:14

    I just created the below 'link' via VI Export Job Maint (PO_VendorPurchaseAddress for IM_ItemVendor), but the new tables' fields are all showing as 'not on file' in my ALE (below).  Is that because I would need to also include PrimaryPurchaseAddressCode in my Key Expression? (although that field doesn't exist in IM_ItemVendor).  So it seems like it's not feasible to pull in Vendor Purchase Address/contact info into the 'Multiple Vendor Lookup' in Item Maint.  Or am I missing a step?

     



    ------------------------------
    Brett Zimmerman
    Net at Work
    Greater Boston Area
    ------------------------------



  • 10.  RE: (Tutorial) Adding additional tables to Lookups

    Posted 03-04-2026 17:02

    I am pretty sure you need all the primary key fields for the table you are linking to.  So, linking to IM_ItemWarehouse would require either ItemCode+DefaultWarehouseCode or ItemCode+"000"... to return a unique result.



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



  • 11.  RE: (Tutorial) Adding additional tables to Lookups

    Posted 03-05-2026 11:35

    Thanks.  Also wondering if this flows into BIE.  At first glance it doesn't appear so but I don't do much BIE stuff.



    ------------------------------
    Brett Zimmerman
    Net at Work
    Greater Boston Area
    ------------------------------



  • 12.  RE: (Tutorial) Adding additional tables to Lookups

    Posted 03-05-2026 11:47

    It does not flow in BIE, BIE links are maintained elsewhere and you can't edit them without the Sage 100 Master Developer tools.



    ------------------------------
    David Speck II
    Blytheco LLC
    ------------------------------



  • 13.  RE: (Tutorial) Adding additional tables to Lookups

    Posted 03-05-2026 11:46

    You do need to have all of the primary key fields in the target table available in the primary table to link to the target table. 

    You could use a sourced UDF in IM_ItemVendor to pull the PrimaryPurchaseAddressCode from the VendorNo source but this can potentially get stale since it won't be updated automatically when a user changes a vendor's primary purchase address.

    Instead, you can make use of the FNREAD$ (for string fields) and FNREAD (for numeric fields) functions in a new calculated field.  For string fields/values, clear the value in the Mask field, it will warn you that it is invalid, just click OK.  Use the following calculation to return the PurchaseName field from the PO_VendorPurchaseAddress table based on the item's vendor's primary address code.  For the additional fields needed from PO_VendorPurchaseAddress, add a new calculated field for each and replace the "PurchaseName" near the end with the field you want returned, don't include the"$" suffix for string fields in this argument.

    FNREAD$(STR(dat.APDivisionNo$) + PAD(STR(dat.VendorNo$), VendorNo.Length, "R", CHR(0)) + STR(FNREAD$(STR(dat.APDivisionNo$) + STR(dat.VendorNo$), "AP_Vendor", "1", 0, "PrimaryPurchaseAddressCode")), "PO_VendorPurchaseAddress", "1", 0, "PurchaseName")


    ------------------------------
    David Speck II
    Blytheco LLC
    ------------------------------



  • 14.  RE: (Tutorial) Adding additional tables to Lookups

    Posted 03-06-2026 08:24

    Thanks, Kevin!  And awesome, David, thanks!!



    ------------------------------
    Brett Zimmerman
    Net at Work
    Greater Boston Area
    ------------------------------