Enter a list of numbers in 'Original Value' and a list of numbers in 'Math Value' and a value (not list) in 'Current Value'. What will be done: based on the value entered in 'Current Value', the closest value found in the 'Original Value' list will be located and it will return the same item as in the 'Math Value' list.
Example:
'Original Value': 29.99,49.52,59.90
'Math Value': 35, 50, 65
(note that both lists must have the same number of values, which in the example above is 3)
Considering the lists above, we will show some examples of Current Value:
_________________
Current Value: 25.44
The returned value will be: 35
Current Value: 37
The value returned will be: 29.99
Current Value: 42.38
The returned value will be: 50
Note that in both list fields, the values must be separated from each other by a comma and must separate decimals with a period '.'
Demo page:
https://retornadado2.bubbleapps.io/version-test/nearest_value_mapper?debug_mode=trueEditor:
https://bubble.io/page?id=retornadado2&test_plugin=1730067336581x789115707717582800_current&tab=tabs-1&name=nearest_value_mapper&type=page