I'm working on a surgery outcome calculator where a user inputs his age, gender, BMI, and another index on the home page of my site. These inputs would then be manipulated through regression equations I have modeled. The individual would then have his/her predicted outcome on a new page. I am confused about retrieving the numerical values of the user inputs because the .get() method returns a Promise object, which I'm not familiar with. For example, do I simply code:
import wixData from 'wix-data';
let var_age = wixData.get("OutcomeCalculator", "age");
let var_gender = wixData.get("OutcomeCalculator", "gender");
//gender was coded so that Male is saved in my database collection as 1 and Female as 0.
The second part of my question is once I run these values through the regression equations, will l be able to show this output on another page. For example if the output was "62% improvement" could I connect my 2nd page to this output.
I appreciate your responses in advance.