In the DB Integration extension, using in a select query the parameter "IN", the result is generated if is matched an ID with an element in array of values.
If this array resulted from a tag, generated previously from a multiple select choice, in the case of no selection the array is empty and the query result is incorrect. The result is a list of data with a correspondence between the select field with the empty value (''), but the expected result should be different. The right result should be a correspondence between the select field and an element contains in the list of all values ('value1','value2',...,'valueN'), where the value N is the last value of the table of interest.
SOLUTION:
We follow the steps below:
- In the result query, where the markers are replaced with the parameters of search, We set the marker of interest with an identification name as ###WFQBE_AWE_001###. Now, we can identify the marker in the code.
- We edited the class.tx_wfqbe_results.php located in the folder p1 under the DB Integration extension:
After the foreach statement in line 101 we added the code in this way:if($marker == 'WFQBE_AWE_001'){
if(empty($markerParametri["###".$marker."###"])){
for($j=1;$j<100;$j++) $variabile.= $j . "','";
$variabile.= $j;
$markerParametri["###".$marker."###"] = $variabile;
}
}
if the content for the tag WFQBE_AWE_001 is empty, the variable $markerParametri["###".$marker."###"] (marker's parameters) takes the value of $variabile (an array of "100" values) . The value "100" can be change with the dynamic count of the rows for the table of interest. In this case the table contains around 15 fields and the number of record is almost static.