* Fix #1055 : Make hlookup require ordered list only if asking for not exact match

* Added test for #1055
This commit is contained in:
Juluan 2019-07-14 12:56:17 +02:00 committed by Mark Baker
parent 42fc71f314
commit 7505638dc8
2 changed files with 15 additions and 3 deletions

View File

@ -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;
}

View File

@ -284,5 +284,15 @@ return [
],
2,
false
]
],
[
2,
'B',
[
['Selection column', 'C', 'B', 'A'],
['Value to retrieve', 3, 2, 1]
],
2,
false
],
];