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);
|
||||
$rowDataLower = StringHelper::strToLower($rowData);
|
||||
|
||||
if (($bothNumeric && $rowData > $lookup_value) ||
|
||||
($bothNotNumeric && $rowDataLower > $lookupLower)) {
|
||||
if ($not_exact_match && (
|
||||
($bothNumeric && $rowData > $lookup_value) ||
|
||||
($bothNotNumeric && $rowDataLower > $lookupLower)
|
||||
)) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -284,5 +284,15 @@ return [
|
|||
],
|
||||
2,
|
||||
false
|
||||
]
|
||||
],
|
||||
[
|
||||
2,
|
||||
'B',
|
||||
[
|
||||
['Selection column', 'C', 'B', 'A'],
|
||||
['Value to retrieve', 3, 2, 1]
|
||||
],
|
||||
2,
|
||||
false
|
||||
],
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue