Conditional Statements

Hello,
I am trying to display (Price) which is calculated by fetching an object from the database table(fuel_price) and using that object to multiply it with an input and display the results before a button is clicked.

Here is my UI.
1)Label 1 → is the fetched data from database (table:fuel_price) (works fine)
2)label → is the input of litres (works fine)
3)label 3) is the selected fuel type with values diesel & petrol.
4)label 4) is the display of price after calculating the input litres & Price fetched on database from label 1 with respect to selected fuel type in label 3.

And this is my content logic for label 4 (where the price is displayed).

whenever i run the app. i keep getting this (NaN)

Whats wrong with my content logic.??

regards.
Stanoss

Anyone ???

Hi
that’s just JS
make sure that you are passing a number not a string
also not an empty field

Make sure the litres input field type is Number. Also make sure the data types of the diesel and petrol columns in the table where fuelpriceObject is from is either INT or DOUBLE.