autocomplete show different list for table and table dir
Description
Overview
table and table direct use different column to query and produce different result list Test case
on window “Table and Column”, choose table M_Product, column Name. Change Sequence = 0
on window “Table and Column”, choose table C_OrderLine, column M_Product_ID. Change Auto complete = true
on window “Table and Column”, choose table M_Production, column M_Product_ID. Change Auto complete = true
on window “Sale Order”, tab “Order Line”, field product, enter “Patio” => list show 1 item “Patio Furniture Set_PatioSet“
on window *Production (Single Product), tab Production, field product, enter “Patio” => list show 2 items “Patio Furniture Set_PatioSet“ and “Patio Chair_PChair“
Reason
InfoWindow.processQueryValue call testCout with logic bellow:
With isAutoComplete = true and autoCompleteSearchColumn not null and autoCompleteSearchColumn is column in identifiers of infoWindow, will query using column autoCompleteSearchColumn
With isAutoComplete = true and autoCompleteSearchColumn IS NOT column in identifiers of infoWindow, will query using first column of identifiers of infoWindow (value column for product info)
NONE for isAutoComplete = true and autoCompleteSearchColumn EXISTS but IS NOT column in identifiers of infoWindow.
isAutoComplete = false, call once per identifiers until count > 0 (4 time for product info)
isAutoComplete = false, after test for all identifiers (step 4) and still count <= 0 then split queryValue and repeat test (step 4) for split identifiers
MLookupFactory.getLookupInfo call getLookup_Table when AD_Reference_Value_ID != 0 and call getLookup_TableDir when AD_Reference_Value_ID == 0
MLookupInfo.lookupDisplayColumnNamesisn’t init in getLookup_TableDir but is init in getLookup_Table
1. => searchcolumn at InfoListSubModel.getSubModel isn't set for product field on sale order line
=> logic (2) is called on InfoWindow.processQueryValue and search for Value column
2. => searchcolumn at InfoListSubModel.getSubModel is set to “name” for product field on Production
=> logic (1) is called on InfoWindow.processQueryValue and search for Name column
Solution:
Copy code init MLookupInfo.lookupDisplayColumnNames in getLookup_Table to getLookup_TableDir
Overview
table and table direct use different column to query and produce different result list
Test case
on window “Table and Column”, choose table M_Product, column Name. Change Sequence = 0
on window “Table and Column”, choose table C_OrderLine, column M_Product_ID. Change Auto complete = true
on window “Table and Column”, choose table M_Production, column M_Product_ID. Change Auto complete = true
on window “Sale Order”, tab “Order Line”, field product, enter “Patio” => list show 1 item “Patio Furniture Set_PatioSet“
on window *Production (Single Product), tab Production, field product, enter “Patio” => list show 2 items “Patio Furniture Set_PatioSet“ and “Patio Chair_PChair“
Reason
InfoWindow
.processQueryValue
call testCout with logic bellow:With
isAutoComplete = true
andautoCompleteSearchColumn
not null andautoCompleteSearchColumn
is column inidentifiers
of infoWindow, will query using columnautoCompleteSearchColumn
With
isAutoComplete = true
andautoCompleteSearchColumn
IS NOT column inidentifiers
of infoWindow, will query using first column ofidentifiers
of infoWindow (value column for product info)NONE for
isAutoComplete = true
andautoCompleteSearchColumn
EXISTS but IS NOT column inidentifiers
of infoWindow.isAutoComplete
= false, call once peridentifiers
until count > 0 (4 time for product info)isAutoComplete
= false, after test for allidentifiers
(step 4) and still count <= 0 then splitqueryValue
and repeat test (step 4) for split identifiersMLookupFactory.getLookupInfo
callgetLookup_Table
whenAD_Reference_Value_ID != 0
and callgetLookup_TableDir
whenAD_Reference_Value_ID == 0
MLookupInfo.
lookupDisplayColumnNames
isn’t init ingetLookup_TableDir
but is init ingetLookup_Table
1.
=> searchcolumn at InfoListSubModel.getSubModel
isn't set for product field on sale order line=> logic (2) is called on InfoWindow
.processQueryValue
and search for Value column2. => searchcolumn at InfoListSubModel.getSubModel
is set to “name” for product field on Production=> logic (1) is called on InfoWindow
.processQueryValue
and search for Name columnSolution:
Copy code init
MLookupInfo.lookupDisplayColumnNames
ingetLookup_Table
togetLookup_TableDir