Fix 1055 (#1076)
* Fix #1055 : Make hlookup require ordered list only if asking for not exact match * Added test for #1055
This commit is contained in:
parent
42fc71f314
commit
7505638dc8
|
@ -794,8 +794,10 @@ class LookupRef
|
||||||
$lookupLower = StringHelper::strToLower($lookup_value);
|
$lookupLower = StringHelper::strToLower($lookup_value);
|
||||||
$rowDataLower = StringHelper::strToLower($rowData);
|
$rowDataLower = StringHelper::strToLower($rowData);
|
||||||
|
|
||||||
if (($bothNumeric && $rowData > $lookup_value) ||
|
if ($not_exact_match && (
|
||||||
($bothNotNumeric && $rowDataLower > $lookupLower)) {
|
($bothNumeric && $rowData > $lookup_value) ||
|
||||||
|
($bothNotNumeric && $rowDataLower > $lookupLower)
|
||||||
|
)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -284,5 +284,15 @@ return [
|
||||||
],
|
],
|
||||||
2,
|
2,
|
||||||
false
|
false
|
||||||
]
|
],
|
||||||
|
[
|
||||||
|
2,
|
||||||
|
'B',
|
||||||
|
[
|
||||||
|
['Selection column', 'C', 'B', 'A'],
|
||||||
|
['Value to retrieve', 3, 2, 1]
|
||||||
|
],
|
||||||
|
2,
|
||||||
|
false
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in New Issue