prietorafael57prietorafael57 Posts: 3Questions: 1Answers: 0

Hello, I am having problem with join no id column,

DataTables warning: table id=IM_ItemVendor - Requested unknown parameter 'IM_ItemVendor.VendorNo' for row 0, column 0.
Join to tables no ID column, same column name oh both tables

Editor::inst( $db, 'IM_ItemVendor', 'VendorNo' )
Field::inst( 'VendorNo' ),
Field::inst( 'ItemCode' ),
Field::inst( 'LastReceiptDate' )
->validator( Validate::dateFormat( 'D, j M Y' ) )
->getFormatter( Format::dateSqlToFormat( 'D, j M Y' ) )
->setFormatter( Format::dateFormatToSql( 'D, j M Y' ) ),
Field::inst( 'LastLeadTime' ),
Field::inst( 'LastReceiptPurchaseOrderNo' )
leftJoin( 'AP_Vendor', 'AP_Vendor.VendorNo', '=', 'IM_ItemVendor.VendorNo' )


  • mimi123456789mimi123456789 Posts: 15Questions: 1Answers: 0


    I don't understand your probleme, can you show the js or explain your table please ?

  • rf1234rf1234 Posts: 2,286Questions: 74Answers: 324

    Since you are joining two tables with identical column names you must use the respective table name as a prefix in your field instances.
    e.g. Field::inst( 'IM_ItemVendor.VendorNo' )

  • prietorafael57prietorafael57 Posts: 3Questions: 1Answers: 0

    Hello I try it but keeps error

  • allanallan Posts: 56,421Questions: 1Answers: 8,955 Site admin

    On the client-side I suspect you currently have:

    data: 'IM_ItemVendor.VendorNo'

    for the column. Change it to just be:

    data: 'VendorNo'

    You only need the table name if you had also specified it in the field at the server-side.


This discussion has been closed.