Help with formula I'm stuck

I’m stuck with using input component, button and list item with formula.

Idea is for users to input numers in the input component, then click on the button component for the result will automatically show in the list items.

So if i intend in an app page, i want the user to easily calculate the BODY MASS INDEX With formula height divided by weight squared but user will only just input weight and height values only and by clicking the button component, the result wil be generated.

Thanks in anticipation of your kind reply

Hi there!

The easiest way to do this would be to create 2 page variables, height and weight. Then bind each to the value property of an input component. This will make it so that the variables are automatically updated based on the user input and then you can use the variables in the formula with pageVars.height and pageVars.weight.